Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
norbybaru committed Jul 7, 2024
1 parent 0af36a0 commit c5ab49f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/Commands/MakeModelCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public function test_it_creates_a_model_with_migration()
)
->assertExitCode(exitCode: 0);

$this->assertMigrationFile(module: $module, migrationFilename: 'create_videos_table.php');

$this->assertFileExists(filename: $this->getModulePath($module).'/Models/Video.php');

$this->assertMigrationFile(module: $module, migrationFilename: 'create_videos_table.php');
}

public function test_it_creates_a_model_with_factory()
Expand Down
3 changes: 2 additions & 1 deletion tests/MakeCommandTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function cleanUp(): void

protected function assertMigrationFile(string $module, string $migrationFilename): void
{
$migrations = $this->files->allFiles(directory: $this->getModulePath($module).'/Database/migrations');
$migrations = $this->files->allFiles(directory: $this->getModulePath($module).'/Database');
dd($migrations);
$this->assertNotEmpty(actual: $migrations);
$this->assertEquals(
expected: 1,
Expand Down

0 comments on commit c5ab49f

Please sign in to comment.