Valid parameters for this driver:
-
(string) dbnameName of the database to connect to -
(string) userUsername to use when connecting -
(string) passwordPassword to use when connecting -
(string) hostHostname to use when connecting -
(string) driverWhich driver to use -
(PDO) pdoPDO adapter to use, as an alternative to specifying the above
/** * @covers Imbo\EventListener\ImageVariations\Database\Doctrine::__construct * @covers Imbo\EventListener\ImageVariations\Database\Doctrine::setConnection */ public function testCanSetConnection() { $connection = $this->getMockBuilder('Doctrine\\DBAL\\Connection')->disableOriginalConstructor()->getMock(); $connection->expects($this->once())->method('insert')->will($this->returnValue(false)); $adapter = new Doctrine([], $connection); $this->assertFalse($adapter->storeImageVariationMetadata('key', 'img', 1337, 1942)); }