Add support in morphTo relationship for null values (1547) (#1549)

Co-authored-by: Barry vd. Heuvel <[email protected]>
This commit is contained in:
michal
2024-07-12 16:06:56 +02:00
committed by GitHub
co-authored by Barry vd. Heuvel
parent 672acce5ae
commit f7a3dc8ff2
6 changed files with 132 additions and 1 deletions
@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\Morphs;
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,
]);
$this->assertSame(0, $tester->getStatusCode());
$this->assertStringContainsString('Written new phpDocBlock to', $tester->getDisplay());
$this->assertMatchesMockedSnapshot();
}
}