|
18 | 18 | use Prophecy\Argument; |
19 | 19 | use Prophecy\Prophecy\ObjectProphecy; |
20 | 20 | use Tests\ConsoleHelpers\DatabaseMigration\ProphecyToken\RegExToken; |
| 21 | +use ConsoleHelpers\DatabaseMigration\AbstractMigrationRunner; |
21 | 22 |
|
22 | 23 | class MigrationManagerTest extends AbstractDatabaseAwareTestCase |
23 | 24 | { |
@@ -54,7 +55,7 @@ protected function setupTest() |
54 | 55 | */ |
55 | 56 | protected function tearDownTest() |
56 | 57 | { |
57 | | - if ( strpos($this->getName(false), 'testCreateMigration') === 0 ) { |
| 58 | + if ( strpos($this->getTestName(), 'testCreateMigration') === 0 ) { |
58 | 59 | $this->deleteTempMigrations(); |
59 | 60 | } |
60 | 61 | } |
@@ -110,7 +111,7 @@ public function testCreateMigrationWithInvalidName($migration_name) |
110 | 111 | $manager->createMigration($migration_name, 'one'); |
111 | 112 | } |
112 | 113 |
|
113 | | - public function createMigrationWithInvalidNameDataProvider() |
| 114 | + public static function createMigrationWithInvalidNameDataProvider() |
114 | 115 | { |
115 | 116 | return array( |
116 | 117 | array(' '), |
@@ -292,7 +293,7 @@ public function testRunRemovedMigrationsAreDeleted() |
292 | 293 |
|
293 | 294 | public function testRunSetsContainerToContext() |
294 | 295 | { |
295 | | - $context = $this->prophesize('ConsoleHelpers\DatabaseMigration\MigrationContext'); |
| 296 | + $context = $this->prophesize(MigrationContext::class); |
296 | 297 | $context->setContainer($this->container)->shouldBeCalled(); |
297 | 298 | $context->getDatabase()->willReturn($this->database)->shouldBeCalled(); |
298 | 299 |
|
@@ -340,7 +341,7 @@ protected function deleteTempMigrations() |
340 | 341 | */ |
341 | 342 | protected function createMigrationRunnerMock($file_extension) |
342 | 343 | { |
343 | | - $runner = $this->prophesize('ConsoleHelpers\DatabaseMigration\AbstractMigrationRunner'); |
| 344 | + $runner = $this->prophesize(AbstractMigrationRunner::class); |
344 | 345 | $runner->getFileExtension()->willReturn($file_extension)->shouldBeCalled(); |
345 | 346 |
|
346 | 347 | return $runner; |
|
0 commit comments