mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 10:07:12 +00:00
* Add option for only eloquent * composer fix-style * Add snapshot * Add option to models command * composer fix-style * Fix namespace --------- Co-authored-by: laravel-ide-helper <[email protected]>
29 lines
1.0 KiB
PHP
29 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\GenerateBasicPhpdocWithEloquentHelper;
|
|
|
|
use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AbstractModelsCommand;
|
|
|
|
class Test extends AbstractModelsCommand
|
|
{
|
|
public function test(): void
|
|
{
|
|
$command = $this->app->make(ModelsCommand::class);
|
|
|
|
$tester = $this->runCommand($command, [
|
|
'--write' => true,
|
|
'--write-eloquent-helper' => true,
|
|
]);
|
|
|
|
$this->assertSame(0, $tester->getStatusCode());
|
|
$this->assertStringContainsString('Written new phpDocBlock to', $tester->getDisplay());
|
|
$this->assertStringNotContainsString('Do you want to generate a minimal helper to generate the Eloquent methods?', $tester->getDisplay());
|
|
$this->assertStringContainsString('Eloquent helper was written to _ide_helper.php', $tester->getDisplay());
|
|
|
|
// $this->assertMatchesMockedSnapshot();
|
|
}
|
|
}
|