1010 */
1111class MigrationRunnerTest extends CIDatabaseTestCase
1212{
13+ protected $ refresh = true ;
14+
1315 protected $ root ;
1416 protected $ start ;
1517 protected $ config ;
@@ -217,15 +219,15 @@ public function testFindMigrationsSuccessOrder()
217219 }
218220
219221 /**
220- * @expectedException \CodeIgniter\Exceptions\ConfigException
221- * @expectedExceptionMessage Migrations have been loaded but are disabled or setup incorrectly.
222+ * @expectedException \CodeIgniter\Exceptions\ConfigException
223+ * @expectedExceptionMessage Migrations have been loaded but are disabled or setup incorrectly.
222224 */
223225 public function testMigrationThrowsDisabledException ()
224226 {
225- $ config = $ this ->config ;
226- $ config ->type = 'sequential ' ;
227+ $ config = $ this ->config ;
228+ $ config ->type = 'sequential ' ;
227229 $ config ->enabled = false ;
228- $ runner = new MigrationRunner ($ config );
230+ $ runner = new MigrationRunner ($ config );
229231
230232 $ runner ->setSilent (false );
231233
@@ -262,21 +264,6 @@ public function testVersionThrowsMigrationGapException()
262264 $ this ->assertFalse ($ version );
263265 }
264266
265- public function testVersionReturnsFalseWhenNothingToDo ()
266- {
267- $ config = $ this ->config ;
268- $ config ->type = 'sequential ' ;
269- $ runner = new MigrationRunner ($ config );
270-
271- $ runner = $ runner ->setPath ($ this ->start );
272-
273- vfsStream::newFile ('001_some_migration.php ' )->at ($ this ->root );
274-
275- $ version = $ runner ->version (0 );
276-
277- $ this ->assertFalse ($ version );
278- }
279-
280267 /**
281268 * @expectedException \RuntimeException
282269 * @expectedExceptionMessage The migration class "App\Database\Migrations\Migration_some_migration" could not be found.
@@ -292,7 +279,7 @@ public function testVersionWithNoClassInFile()
292279
293280 vfsStream::newFile ('001_some_migration.php ' )->at ($ this ->root );
294281
295- $ version = $ runner ->version (1 );
282+ $ version = $ runner ->version (0 );
296283
297284 $ this ->assertFalse ($ version );
298285 }
0 commit comments