Skip to content

Commit

Permalink
fully qualified class names for the name argument support
Browse files Browse the repository at this point in the history
  • Loading branch information
salehhashemi1992 committed Mar 13, 2024
1 parent 9265817 commit 0c14494
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/MakeRepositoryCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,21 @@ public function testRepositoryStubGeneration(): void
$this->assertFileExists($file);
}
}

public function testRepositoryStubGenerationWithFQCN(): void
{
$fqcn = 'App\Models\Special\CustomModel';

$this->artisan('make:repository', ['name' => $fqcn]);

$expectedFiles = [
"{$this->basePath}/{$this->model}Repository.php",
"{$this->basePath}/Contracts/{$this->model}RepositoryInterface.php",
"{$this->basePath}/Filters/{$this->model}Filter.php",
];

foreach ($expectedFiles as $file) {
$this->assertFileExists($file);

Check failure on line 56 in tests/MakeRepositoryCommandTest.php

View workflow job for this annotation

GitHub Actions / P8.2 - L10.* - prefer-stable - ubuntu-latest

Failed asserting that file "/home/runner/work/laravel-repository/laravel-repository/vendor/orchestra/testbench-core/laravel/app/Repositories/TestModelRepository.php" exists.

Check failure on line 56 in tests/MakeRepositoryCommandTest.php

View workflow job for this annotation

GitHub Actions / P8.1 - L10.* - prefer-stable - ubuntu-latest

Failed asserting that file "/home/runner/work/laravel-repository/laravel-repository/vendor/orchestra/testbench-core/laravel/app/Repositories/TestModelRepository.php" exists.

Check failure on line 56 in tests/MakeRepositoryCommandTest.php

View workflow job for this annotation

GitHub Actions / P8.1 - L9.* - prefer-stable - ubuntu-latest

Failed asserting that file "/home/runner/work/laravel-repository/laravel-repository/vendor/orchestra/testbench-core/laravel/app/Repositories/TestModelRepository.php" exists.

Check failure on line 56 in tests/MakeRepositoryCommandTest.php

View workflow job for this annotation

GitHub Actions / P8.2 - L10.* - prefer-stable - ubuntu-latest

Failed asserting that file "/home/runner/work/laravel-repository/laravel-repository/vendor/orchestra/testbench-core/laravel/app/Repositories/TestModelRepository.php" exists.

Check failure on line 56 in tests/MakeRepositoryCommandTest.php

View workflow job for this annotation

GitHub Actions / P8.1 - L10.* - prefer-stable - ubuntu-latest

Failed asserting that file "/home/runner/work/laravel-repository/laravel-repository/vendor/orchestra/testbench-core/laravel/app/Repositories/TestModelRepository.php" exists.

Check failure on line 56 in tests/MakeRepositoryCommandTest.php

View workflow job for this annotation

GitHub Actions / P8.1 - L9.* - prefer-stable - ubuntu-latest

Failed asserting that file "/home/runner/work/laravel-repository/laravel-repository/vendor/orchestra/testbench-core/laravel/app/Repositories/TestModelRepository.php" exists.
}
}
}

0 comments on commit 0c14494

Please sign in to comment.