public static function load(PDO $connection) { $name = $connection->getAttribute(PDO::ATTR_DRIVER_NAME); switch ($name) { case 'mysql': return MySql::loadPDO($connection); case 'pgsql': return PostGreSql::loadPDO($connection); case 'sqlite': return Sqlite::loadPDO($connection); default: throw SqlException::forUnknownPDO($name); } }
/** * @covers Cradle\Sql\Sqlite::getUtilityQuery */ public function testGetUtilityQuery() { $instance = $this->object->getUtilityQuery(); $this->assertInstanceOf('Cradle\\Sql\\Sqlite\\QueryUtility', $instance); }