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; ...@@ -6,7 +6,7 @@ use Doctrine\Tests\DBAL\Component;
use Doctrine\Tests\DBAL\Ticker; use Doctrine\Tests\DBAL\Ticker;
if (!defined('PHPUnit_MAIN_METHOD')) { 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'; require_once __DIR__ . '/../TestInit.php';
...@@ -22,12 +22,12 @@ class AllTests ...@@ -22,12 +22,12 @@ class AllTests
{ {
$suite = new \Doctrine\Tests\DbalTestSuite('Doctrine DBAL'); $suite = new \Doctrine\Tests\DbalTestSuite('Doctrine DBAL');
$suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\AbstractPlatformTest'); $suite->addTestSuite('Doctrine\Tests\DBAL\Platforms\SqlitePlatformTest');
return $suite; return $suite;
} }
} }
if (PHPUnit_MAIN_METHOD == 'Dbal_AllTests::main') { if (PHPUnit_MAIN_METHOD == 'Dbal_Platforms_AllTests::main') {
AllTests::main(); AllTests::main();
} }
\ No newline at end of file
...@@ -2,23 +2,17 @@ ...@@ -2,23 +2,17 @@
namespace Doctrine\Tests\DBAL\Platforms; namespace Doctrine\Tests\DBAL\Platforms;
use Doctrine\DBAL\Platforms\SqlitePlatform;
require_once __DIR__ . '/../../TestInit.php'; require_once __DIR__ . '/../../TestInit.php';
class AbstractPlatformTest extends \Doctrine\Tests\DbalTestCase class SqlitePlatformTest extends \Doctrine\Tests\DbalTestCase
{ {
private $_conn; private $_platform;
public function setUp() public function setUp()
{ {
$this->_config = new \Doctrine\DBAL\Configuration; $this->_platform = new SqlitePlatform;
$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();
} }
public function testGetCreateTableSql() 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