From 4f9939e15daec20ce5637405864243b223ede0ca Mon Sep 17 00:00:00 2001 From: Norby Baruani Date: Sun, 16 Jun 2024 13:54:49 +0200 Subject: [PATCH] refactor --- tests/Commands/MakeModelCommandTest.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/Commands/MakeModelCommandTest.php b/tests/Commands/MakeModelCommandTest.php index dc37eda..d78c1ca 100644 --- a/tests/Commands/MakeModelCommandTest.php +++ b/tests/Commands/MakeModelCommandTest.php @@ -33,10 +33,11 @@ public function test_it_creates_a_model_with_migration() ) ->assertExitCode(exitCode: 0); - $this->assertFileExists(filename: $this->getModulePath($module).'/Models/Video.php'); $this->assertDirectoryExists( - directory: $this->getModulePath($module).'/Database/migration/' + directory: $this->getModulePath($module).'/Database/migration' ); + $this->assertFileExists(filename: $this->getModulePath($module).'/Models/Video.php'); + // TODO: Fix timestamp issue in test // $this->assertFileExists(filename: $this->getModulePath().'/Database/migration/'.$datetime.'_create_posts_table.php'); } @@ -71,12 +72,14 @@ public function test_it_creates_a_model_with_migration_and_factory() ) ->assertExitCode(exitCode: 0); + $this->assertDirectoryExists( + directory: $this->getModulePath($module).'/Database/migration' + ); + $this->assertFileExists( filename: $this->getModulePath($module).'/Models/Listing.php' ); - $this->assertDirectoryExists( - directory: $this->getModulePath($module).'/Database/migration/' - ); + // TODO: Fix timestamp issue in test // $this->assertFileExists( // filename: $this->getModulePath().'/Database/migration/'.$datetime.'_create_posts_table.php'