mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Add filename test
This commit is contained in:
@@ -13,7 +13,6 @@ abstract class AbstractGeneratorCommand extends TestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
// $this->artisan('key:gen');
|
||||
|
||||
$this->mockFilesystem();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ use Barryvdh\LaravelIdeHelper\Tests\Console\GeneratorCommand\AbstractGeneratorCo
|
||||
|
||||
class Test extends AbstractGeneratorCommand
|
||||
{
|
||||
public function test(): void
|
||||
public function testGenerator(): void
|
||||
{
|
||||
$command = $this->app->make(GeneratorCommand::class);
|
||||
|
||||
@@ -19,4 +19,17 @@ class Test extends AbstractGeneratorCommand
|
||||
$this->assertStringContainsString('A new helper file was written to _ide_helper.php', $tester->getDisplay());
|
||||
$this->assertMatchesMockedSnapshot();
|
||||
}
|
||||
|
||||
public function testFilename(): void
|
||||
{
|
||||
$command = $this->app->make(GeneratorCommand::class);
|
||||
|
||||
$tester = $this->runCommand($command, [
|
||||
'filename' => 'foo.php',
|
||||
]);
|
||||
|
||||
$this->assertSame(0, $tester->getStatusCode());
|
||||
$this->assertStringContainsString('A new helper file was written to foo.php', $tester->getDisplay());
|
||||
$this->assertMatchesMockedSnapshot();
|
||||
}
|
||||
}
|
||||
|
||||
+22668
File diff suppressed because it is too large
Load Diff
+22668
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user