class FakeDriver implements Driver (View source)

FakeDriver class to simulate a problem discussed in DoctrineBundle issue #673 In order to not use a real database driver we have to create our own fake/mock implementation.

Properties

static DriverException $exception Exception Mock

Methods

getDatabasePlatform()

This method gets called to determine the database version which in our case leeds to the problem.

connect(array $params, string|null $username = null, string|null $password = null, array $driverOptions = [])

No description

getSchemaManager(Connection $conn)

No description

getName()

No description

getDatabase(Connection $conn)

No description

Details

getDatabasePlatform()

This method gets called to determine the database version which in our case leeds to the problem.

So we have to fake the exception a driver would normally throw.

connect(array $params, string|null $username = null, string|null $password = null, array $driverOptions = [])

Parameters

array $params
string|null $username
string|null $password
array $driverOptions

getSchemaManager(Connection $conn)

Parameters

Connection $conn

getName()

getDatabase(Connection $conn)

Parameters

Connection $conn