vendor/doctrine-migrations/tests/Doctrine/DBAL/Migrations/Tests/MigrationTestCase.php
equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 namespace Doctrine\DBAL\Migrations\Tests; |
|
4 |
|
5 use Doctrine\Common\ClassLoader; |
|
6 use Doctrine\DBAL\DriverManager; |
|
7 |
|
8 abstract class MigrationTestCase extends \PHPUnit_Framework_TestCase |
|
9 { |
|
10 public function getSqliteConnection() |
|
11 { |
|
12 $params = array('driver' => 'pdo_sqlite', 'memory' => true); |
|
13 return DriverManager::getConnection($params); |
|
14 } |
|
15 |
|
16 /** |
|
17 * @return \Doctrine\DBAL\Migrations\Configuration\Configuration |
|
18 */ |
|
19 public function getSqliteConfiguration() |
|
20 { |
|
21 $config = new \Doctrine\DBAL\Migrations\Configuration\Configuration($this->getSqliteConnection()); |
|
22 $config->setMigrationsDirectory(\sys_get_temp_dir()); |
|
23 $config->setMigrationsNamespace('DoctrineMigrations'); |
|
24 return $config; |
|
25 } |
|
26 } |