Skip to content

Commit 13da8b0

Browse files
committed
Update CreateMigrationTest.php
1 parent c59fac0 commit 13da8b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/WebFiori/Framework/Tests/Cli/CreateMigrationTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ public function testCreateMigration01() {
6161
"11"
6262
]));
6363
$this->assertEquals(0, $this->getExitCode());
64+
65+
// Check if file was written and require it
66+
$filePath = APP_PATH . 'Database' . DS . 'Migrations' . DS . $name . '.php';
67+
$this->assertTrue(file_exists($filePath), "Class file was not created: $filePath");
68+
require_once $filePath;
6469
$this->assertTrue(class_exists($clazz));
6570
$this->removeClass($clazz);
6671
}

0 commit comments

Comments
 (0)