use Symfony\Component\Messenger\Bridge\Doctrine\Tests\Fixtures\DummyMessage;
use Symfony\Component\Messenger\Bridge\Doctrine\Transport\Connection;
use Symfony\Component\Messenger\Exception\InvalidArgumentException;
use Symfony\Component\Messenger\Exception\TransportException;
class ConnectionTest extends TestCase
{ public function testGetAMessageWillChangeItsStatus() { $queryBuilder =
$this->
getQueryBuilderMock();
$driverConnection =
$this->
getDBALConnectionMock();
$stmt =
$this->
getResultMock([ 'id' => 1,
'body' => '{"message":"Hi"}',
'headers' =>
json_encode(['type' => DummyMessage::
class]),
]);
$driverConnection ->
method('createQueryBuilder'
) ->
willReturn($queryBuilder);
$queryBuilder ->
method('getSQL'
) ->
willReturn(''
);