Skip to content

Commit aede0b9

Browse files
committed
Updated tests.
1 parent ef8002a commit aede0b9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Phinx/Migration/Migration.template.php.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?php
22
declare(strict_types=1);
3-
43
$namespaceDefinition
54
use $useClassName;
65

tests/Phinx/Console/Command/CreateTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testCreateMigrationDefault(): void
9898
$this->assertRegExp("/^[0-9]{14}.php/", $fileName);
9999
$date = substr($fileName, 0, 14);
100100
$this->assertFileExists($this->config->getMigrationPaths()[0]);
101-
$prefix = "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass V{$date} extends AbstractMigration";
101+
$prefix = "<?php\ndeclare(strict_types=1);\n\nuse Phinx\\Migration\\AbstractMigration;\n\nfinal class V{$date} extends AbstractMigration\n";
102102
$this->assertStringStartsWith($prefix, file_get_contents($this->config->getMigrationPaths()[0] . DIRECTORY_SEPARATOR . $fileName));
103103
}
104104

@@ -125,9 +125,8 @@ public function testCreateMigrationWithName(): void
125125
$this->assertCount(1, $files);
126126
$fileName = current($files);
127127
$this->assertRegExp("/^[0-9]{14}_my_migration.php/", $fileName);
128-
$date = substr($fileName, 0, 14);
129128
$this->assertFileExists($this->config->getMigrationPaths()[0]);
130-
$prefix = "<?php\n\nuse Phinx\\Migration\\AbstractMigration;\n\nclass MyMigration extends AbstractMigration";
129+
$prefix = "<?php\ndeclare(strict_types=1);\n\nuse Phinx\\Migration\\AbstractMigration;\n\nfinal class MyMigration extends AbstractMigration";
131130
$this->assertStringStartsWith($prefix, file_get_contents($this->config->getMigrationPaths()[0] . DIRECTORY_SEPARATOR . $fileName));
132131
}
133132

0 commit comments

Comments
 (0)