Files
barryvdh_laravel-ide-helper/tests/Console/ModelsCommand/UniqueColumn/Test.php
T
Youssef MansourandYoussef Mansour 04c8d5dd2f Add regression test for unique() column type resolution (#1787)
Confirms string()->unique() correctly resolves to string type.
Related to barryvdh/laravel-ide-helper#1747

Co-authored-by: Youssef Mansour <[email protected]>
2026-07-10 10:41:38 +02:00

26 lines
688 B
PHP

<?php
declare(strict_types=1);
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\UniqueColumn;
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();
}
}