generated from filamentphp/plugin-skeleton
-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixes #101 - Added a test for the same feature
- Loading branch information
1 parent
1ff98bc
commit 87f9147
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
// Setup for all tests | ||
beforeEach(function () { | ||
$this->trait = new class extends \Illuminate\Console\Command | ||
{ | ||
use Coolsam\Modules\Concerns\GeneratesModularFiles; | ||
|
||
public function getRelativeNamespace(): string | ||
{ | ||
return 'Commands'; | ||
} | ||
|
||
public function getStub() | ||
{ | ||
return $this->resolveStubPath('stubs/filament-plugin.stub'); | ||
} | ||
}; | ||
}); | ||
|
||
test('can generate the correct stubs path', function () { | ||
// include the GeneratesModularFiles trait | ||
expect($this->trait->getStub()) | ||
->toEqual(realpath(__DIR__.'/../../src/Commands/stubs/filament-plugin.stub')); | ||
}); |