2008-09-12 21:25:38 +04:00
|
|
|
<?php
|
2008-09-13 10:34:47 +04:00
|
|
|
|
2009-01-04 19:15:32 +03:00
|
|
|
#namespace Doctrine\Tests\Mocks;
|
|
|
|
|
2008-09-12 21:25:38 +04:00
|
|
|
require_once 'lib/mocks/Doctrine_DriverConnectionMock.php';
|
2008-09-13 10:34:47 +04:00
|
|
|
require_once 'lib/mocks/Doctrine_DatabasePlatformMock.php';
|
|
|
|
|
|
|
|
// THIS FILE DOES NOT EXIST YET!!!!
|
|
|
|
//require_once 'lib/mocks/Doctrine_SchemaManagerMock.php';
|
2008-09-12 21:25:38 +04:00
|
|
|
|
|
|
|
class Doctrine_DriverMock implements Doctrine_DBAL_Driver
|
|
|
|
{
|
|
|
|
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
|
|
|
|
{
|
|
|
|
return new Doctrine_DriverConnectionMock();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs the Sqlite PDO DSN.
|
|
|
|
*
|
|
|
|
* @return string The DSN.
|
|
|
|
* @override
|
|
|
|
*/
|
|
|
|
protected function _constructPdoDsn(array $params)
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDatabasePlatform()
|
|
|
|
{
|
|
|
|
return new Doctrine_DatabasePlatformMock();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSchemaManager(Doctrine_DBAL_Connection $conn)
|
|
|
|
{
|
|
|
|
return new Doctrine_SchemaManagerMock($conn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|