mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
testing
This commit is contained in:
@@ -28,4 +28,23 @@ class Test extends AbstractModelsCommand
|
||||
$this->assertStringContainsString('Written new phpDocBlock to', $tester->getDisplay());
|
||||
$this->assertMatchesMockedSnapshot();
|
||||
}
|
||||
|
||||
/** @test */
|
||||
public function it_doesnt_generate_phpdoc_for_model_doesnt_have_factory()
|
||||
{
|
||||
if (!version_compare(Application::VERSION, '8.2', '>=')) {
|
||||
$this->markTestSkipped(
|
||||
'This test only works in Laravel >= 8.2'
|
||||
);
|
||||
}
|
||||
|
||||
$command = $this->app->make(ModelsCommand::class);
|
||||
|
||||
$tester = $this->runCommand($command, [
|
||||
'--write' => true,
|
||||
]);
|
||||
|
||||
$this->assertStringNotContainsString('not found', $tester->getDisplay());
|
||||
$this->assertMatchesMockedSnapshot();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user