|
@@ 75-93 (lines=19) @@
|
| 72 |
|
$this->assertSame($nameGenerator, $migration->getNameGenerator()); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
public function testValidExtensionWithDependencies() |
| 76 |
|
{ |
| 77 |
|
$migration = new MigrationWithTestExtension(); |
| 78 |
|
$extension = new TestExtension(); |
| 79 |
|
$platform = new MySqlPlatform(); |
| 80 |
|
$nameGenerator = new DbIdentifierNameGenerator(); |
| 81 |
|
|
| 82 |
|
$manager = new MigrationExtensionManager(); |
| 83 |
|
$manager->setDatabasePlatform($platform); |
| 84 |
|
$manager->setNameGenerator($nameGenerator); |
| 85 |
|
$manager->addExtension('test', $extension); |
| 86 |
|
$manager->applyExtensions($migration); |
| 87 |
|
|
| 88 |
|
$this->assertSame($extension, $migration->getTestExtension()); |
| 89 |
|
$this->assertSame($platform, $extension->getDatabasePlatform()); |
| 90 |
|
$this->assertSame($nameGenerator, $extension->getNameGenerator()); |
| 91 |
|
$this->assertSame($platform, $migration->getDatabasePlatform()); |
| 92 |
|
$this->assertSame($nameGenerator, $migration->getNameGenerator()); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
public function testAnotherValidExtensionWithDependencies() |
| 96 |
|
{ |
|
@@ 95-113 (lines=19) @@
|
| 92 |
|
$this->assertSame($nameGenerator, $migration->getNameGenerator()); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
public function testAnotherValidExtensionWithDependencies() |
| 96 |
|
{ |
| 97 |
|
$migration = new MigrationWithTestExtension(); |
| 98 |
|
$extension = new AnotherTestExtension(); |
| 99 |
|
$platform = new MySqlPlatform(); |
| 100 |
|
$nameGenerator = new DbIdentifierNameGenerator(); |
| 101 |
|
|
| 102 |
|
$manager = new MigrationExtensionManager(); |
| 103 |
|
$manager->setDatabasePlatform($platform); |
| 104 |
|
$manager->setNameGenerator($nameGenerator); |
| 105 |
|
$manager->addExtension('test', $extension); |
| 106 |
|
$manager->applyExtensions($migration); |
| 107 |
|
|
| 108 |
|
$this->assertSame($extension, $migration->getTestExtension()); |
| 109 |
|
$this->assertSame($platform, $extension->getDatabasePlatform()); |
| 110 |
|
$this->assertSame($nameGenerator, $extension->getNameGenerator()); |
| 111 |
|
$this->assertSame($platform, $migration->getDatabasePlatform()); |
| 112 |
|
$this->assertSame($nameGenerator, $migration->getNameGenerator()); |
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
public function testExtensionDependedToOtherExtension() |
| 116 |
|
{ |