Simplified first platform test. Further platform tests should follow the same scheme.
This commit is contained in:
parent
68147808f6
commit
a38a1f5188
@ -6,7 +6,7 @@ use Doctrine\Tests\DBAL\Component;
|
||||
use Doctrine\Tests\DBAL\Ticker;
|
||||
|
||||
if (!defined('PHPUnit_MAIN_METHOD')) {
|
||||
define('PHPUnit_MAIN_METHOD', 'Dbal_AllTests::main');
|
||||
define('PHPUnit_MAIN_METHOD', 'Dbal_Platforms_AllTests::main');
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/../TestInit.php';
|
||||
@ -22,12 +22,12 @@ class AllTests
|
||||
{
|
||||
$suite = new \Doctrine\Tests\DbalTestSuite('Doctrine DBAL');
|
||||
|
||||
$suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\AbstractPlatformTest');
|
||||
$suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\SqlitePlatformTest');
|
||||
|
||||
return $suite;
|
||||
}
|
||||
}
|
||||
|
||||
if (PHPUnit_MAIN_METHOD == 'Dbal_AllTests::main') {
|
||||
if (PHPUnit_MAIN_METHOD == 'Dbal_Platforms_AllTests::main') {
|
||||
AllTests::main();
|
||||
}
|
@ -2,23 +2,17 @@
|
||||
|
||||
namespace Doctrine\Tests\DBAL\Platforms;
|
||||
|
||||
use Doctrine\DBAL\Platforms\SqlitePlatform;
|
||||
|
||||
require_once __DIR__ . '/../../TestInit.php';
|
||||
|
||||
class AbstractPlatformTest extends \Doctrine\Tests\DbalTestCase
|
||||
class SqlitePlatformTest extends \Doctrine\Tests\DbalTestCase
|
||||
{
|
||||
private $_conn;
|
||||
private $_platform;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->_config = new \Doctrine\DBAL\Configuration;
|
||||
$this->_eventManager = new \Doctrine\Common\EventManager;
|
||||
$options = array(
|
||||
'driver' => 'pdo_sqlite',
|
||||
'memory' => true
|
||||
);
|
||||
$this->_conn = \Doctrine\DBAL\DriverManager::getConnection($options, $this->_config, $this->_eventManager);
|
||||
$this->_platform = $this->_conn->getDatabasePlatform();
|
||||
$this->_sm = $this->_conn->getSchemaManager();
|
||||
$this->_platform = new SqlitePlatform;
|
||||
}
|
||||
|
||||
public function testGetCreateTableSql()
|
Loading…
Reference in New Issue
Block a user