Commit a38a1f51 authored by romanb's avatar romanb

Simplified first platform test. Further platform tests should follow the same scheme.

parent 68147808
......@@ -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();
}
\ No newline at end of file
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment