diff options
Diffstat (limited to 'tests/dbal/migrator_test.php')
-rw-r--r-- | tests/dbal/migrator_test.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php index c18c49b2a0..d1e12e5b2e 100644 --- a/tests/dbal/migrator_test.php +++ b/tests/dbal/migrator_test.php @@ -174,10 +174,14 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case public function test_revert() { + global $migrator_test_revert_counter; + // Make sure there are no other migrations in the db, this could cause issues $this->db->sql_query("DELETE FROM phpbb_migrations"); $this->migrator->load_migration_state(); + $migrator_test_revert_counter = 0; + $this->migrator->set_migrations(array('phpbb_dbal_migration_revert', 'phpbb_dbal_migration_revert_with_dependency')); $this->assertFalse($this->migrator->migration_state('phpbb_dbal_migration_revert')); @@ -219,6 +223,11 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case { $this->fail('Revert did not remove test_column.'); } + + if ($migrator_test_revert_counter != 1) + { + $this->fail('Revert did not recall the customs functions.'); + } } public function test_fail() |