Raise version min PHP 7.3.

This commit is contained in:
Wilmer Arambula
2024-03-20 17:27:20 -03:00
parent e2a167028b
commit ce813e5060
189 changed files with 1901 additions and 1586 deletions

View File

@ -228,7 +228,7 @@ CODE;
$this->assertSame(ExitCode::OK, $this->getExitCode());
$files = FileHelper::findFiles($this->migrationPath);
$this->assertCount(1, $files, 'Unable to create new migration!');
$this->assertContains($migrationName, basename($files[0]), 'Wrong migration name!');
$this->assertStringContainsString($migrationName, basename($files[0]), 'Wrong migration name!');
}
public function testUp()
@ -294,7 +294,7 @@ CODE;
public function testHistory()
{
$output = $this->runMigrateControllerAction('history');
$this->assertContains('No migration', $output);
$this->assertStringContainsString('No migration', $output);
$this->createMigration('test_history1');
$this->createMigration('test_history2');
@ -303,8 +303,8 @@ CODE;
$output = $this->runMigrateControllerAction('history');
$this->assertSame(ExitCode::OK, $this->getExitCode());
$this->assertContains('_test_history1', $output);
$this->assertContains('_test_history2', $output);
$this->assertStringContainsString('_test_history1', $output);
$this->assertStringContainsString('_test_history2', $output);
}
/**
@ -316,7 +316,7 @@ CODE;
$output = $this->runMigrateControllerAction('new');
$this->assertSame(ExitCode::OK, $this->getExitCode());
$this->assertContains('_test_new1', $output);
$this->assertStringContainsString('_test_new1', $output);
$this->runMigrateControllerAction('up');
$this->assertSame(ExitCode::OK, $this->getExitCode());
@ -393,8 +393,8 @@ CODE;
$this->assertSame(ExitCode::OK, $this->getExitCode());
$files = FileHelper::findFiles($this->migrationPath);
$fileContent = file_get_contents($files[0]);
$this->assertContains("namespace {$this->migrationNamespace};", $fileContent);
$this->assertRegExp('/class M[0-9]{12}' . ucfirst($migrationName) . '/s', $fileContent);
$this->assertStringContainsString("namespace {$this->migrationNamespace};", $fileContent);
$this->assertMatchesRegularExpression('/class M[0-9]{12}' . ucfirst($migrationName) . '/s', $fileContent);
unlink($files[0]);
// namespace specify :
@ -406,7 +406,7 @@ CODE;
$this->assertSame(ExitCode::OK, $this->getExitCode());
$files = FileHelper::findFiles($this->migrationPath);
$fileContent = file_get_contents($files[0]);
$this->assertContains("namespace {$this->migrationNamespace};", $fileContent);
$this->assertStringContainsString("namespace {$this->migrationNamespace};", $fileContent);
unlink($files[0]);
// no namespace:
@ -478,7 +478,7 @@ CODE;
];
$output = $this->runMigrateControllerAction('history', [], $controllerConfig);
$this->assertContains('No migration', $output);
$this->assertStringContainsString('No migration', $output);
$this->createNamespaceMigration('history1');
$this->createNamespaceMigration('history2');
@ -487,8 +487,8 @@ CODE;
$output = $this->runMigrateControllerAction('history', [], $controllerConfig);
$this->assertSame(ExitCode::OK, $this->getExitCode());
$this->assertRegExp('/' . preg_quote($this->migrationNamespace) . '.*History1/s', $output);
$this->assertRegExp('/' . preg_quote($this->migrationNamespace) . '.*History2/s', $output);
$this->assertMatchesRegularExpression('/' . preg_quote($this->migrationNamespace) . '.*History1/s', $output);
$this->assertMatchesRegularExpression('/' . preg_quote($this->migrationNamespace) . '.*History2/s', $output);
}
/**