$this->
assertEquals('{"message":"Hi again"}',
$doctrineEnvelopes[1
]['body'
]);
$this->
assertEquals(['type' => DummyMessage::
class],
$doctrineEnvelopes[1
]['headers'
]);
} /**
* @dataProvider providePlatformSql
*/
public function testGeneratedSql(AbstractPlatform
$platform, string
$expectedSql) { $driverConnection =
$this->
createMock(DBALConnection::
class);
$driverConnection->
method('getDatabasePlatform'
)->
willReturn($platform);
$driverConnection->
method('createQueryBuilder'
)->
willReturnCallback(fn () =>
new QueryBuilder($driverConnection));
if (class_exists(Result::
class)) { $result =
$this->
createMock(Result::
class);
$result->
method('fetchAssociative'
)->
willReturn(false
);
} else { $result =
$this->
createMock(ResultStatement::
class);
$result->
method('fetch'
)->
willReturn(false
);
} $driverConnection->
expects($this->
once())->
method('beginTransaction'
);
$driverConnection