vendor/doctrine-migrations/tests/Doctrine/DBAL/Migrations/Tests/MigrationTest.php
equal
deleted
inserted
replaced
|
1 <?php |
|
2 |
|
3 namespace Doctrine\DBAL\Migrations\Tests; |
|
4 |
|
5 use Doctrine\DBAL\Migrations\Configuration\Configuration; |
|
6 use Doctrine\DBAL\Migrations\Migration; |
|
7 |
|
8 class MigrationTest extends MigrationTestCase |
|
9 { |
|
10 private $config; |
|
11 |
|
12 public function setUp() |
|
13 { |
|
14 $this->config = new Configuration($this->getSqliteConnection()); |
|
15 $this->config->setMigrationsDirectory(\sys_get_temp_dir()); |
|
16 $this->config->setMigrationsNamespace('DoctrineMigrations\\'); |
|
17 } |
|
18 |
|
19 public function testMigrateToUnknownVersionThrowsException() |
|
20 { |
|
21 $migration = new Migration($this->config); |
|
22 |
|
23 $this->setExpectedException('Doctrine\DBAL\Migrations\MigrationException', 'Could not find migration version 1234'); |
|
24 $migration->migrate('1234'); |
|
25 } |
|
26 |
|
27 public function testMigrateToCurrentVersionReturnsEmpty() |
|
28 { |
|
29 $migration = new Migration($this->config); |
|
30 |
|
31 $sql = $migration->migrate('0'); |
|
32 $this->assertEquals(array(), $sql); |
|
33 } |
|
34 } |