mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 18:13:11 +00:00
* feat: add support for AsCollection and AsArrayObject casts * update changelog * improve tests * remove change * composer fix-style * snapshot --------- Co-authored-by: Barry vd. Heuvel <[email protected]> Co-authored-by: laravel-ide-helper <[email protected]>
32 lines
915 B
PHP
32 lines
915 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AdvancedCasts;
|
|
|
|
use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
|
|
use Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\AbstractModelsCommand;
|
|
use Illuminate\Foundation\Application;
|
|
|
|
class Test extends AbstractModelsCommand
|
|
{
|
|
public function test(): void
|
|
{
|
|
if (!version_compare(Application::VERSION, '8.28', '>=')) {
|
|
$this->markTestSkipped(
|
|
'This test only works in Laravel >= 8.28'
|
|
);
|
|
}
|
|
|
|
$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();
|
|
}
|
|
}
|