Add test to ensure unwated migrations are not produced

[MAILPOET-1717]
This commit is contained in:
Jan Jakeš
2019-01-30 14:00:12 +01:00
parent fc4f0a2851
commit 5495e4c2eb
2 changed files with 16 additions and 9 deletions

View File

@ -14,6 +14,14 @@ class MigratorTest extends \MailPoetTest {
expect($subscriber_sql)->contains($expected_table);
}
function testItDoesNotMigrateWhenDatabaseIsUpToDate() {
$changes = $this->migrator->up();
$this->assertEmpty(
$changes,
"Expected no migrations. However, the following changes are planned:\n\t" . implode($changes, "\n\t")
);
}
function _after() {
}
}