File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
tests/Phinx/Console/Command Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
declare(strict_types=1);
3
-
4
3
$namespaceDefinition
5
4
use $useClassName;
6
5
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public function testCreateMigrationDefault(): void
98
98
$ this ->assertRegExp ("/^[0-9]{14}.php/ " , $ fileName );
99
99
$ date = substr ($ fileName , 0 , 14 );
100
100
$ this ->assertFileExists ($ this ->config ->getMigrationPaths ()[0 ]);
101
- $ prefix = "<?php \n\nuse Phinx \\Migration \\AbstractMigration; \n\n class V {$ date } extends AbstractMigration " ;
101
+ $ prefix = "<?php \n declare(strict_types=1); \ n\nuse Phinx \\Migration \\AbstractMigration; \n\n final class V {$ date } extends AbstractMigration \n " ;
102
102
$ this ->assertStringStartsWith ($ prefix , file_get_contents ($ this ->config ->getMigrationPaths ()[0 ] . DIRECTORY_SEPARATOR . $ fileName ));
103
103
}
104
104
@@ -125,9 +125,8 @@ public function testCreateMigrationWithName(): void
125
125
$ this ->assertCount (1 , $ files );
126
126
$ fileName = current ($ files );
127
127
$ this ->assertRegExp ("/^[0-9]{14}_my_migration.php/ " , $ fileName );
128
- $ date = substr ($ fileName , 0 , 14 );
129
128
$ this ->assertFileExists ($ this ->config ->getMigrationPaths ()[0 ]);
130
- $ prefix = "<?php \n\nuse Phinx \\Migration \\AbstractMigration; \n\n class MyMigration extends AbstractMigration " ;
129
+ $ prefix = "<?php \n declare(strict_types=1); \ n\nuse Phinx \\Migration \\AbstractMigration; \n\n final class MyMigration extends AbstractMigration " ;
131
130
$ this ->assertStringStartsWith ($ prefix , file_get_contents ($ this ->config ->getMigrationPaths ()[0 ] . DIRECTORY_SEPARATOR . $ fileName ));
132
131
}
133
132
You can’t perform that action at this time.
0 commit comments