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;
|
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
|
|||||||
{
|
{
|
||||||
$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();
|
||||||
}
|
}
|
@ -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()
|
Loading…
Reference in New Issue
Block a user