/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Integration/Console/CallCommandsTest.php
38 строк
1008 B
Ahmed Alaa
Add missing void return type to test methods (#56860)
02 сен 2025, 01:45
Не верифицирован
02 сен 2025, 01:45
c0bae54
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Integration\Console; use Illuminate\Foundation\Console\ViewClearCommand; use Illuminate\Support\Facades\Artisan; use Orchestra\Testbench\TestCase; use PHPUnit\Framework\Attributes\TestWith; class CallCommandsTest extends TestCase { protected function setUp(): void { $this->afterApplicationCreated(function () { Artisan::command('test:a', function () { $this->call('view:clear'); }); Artisan::command('test:b', function () { $this->call(ViewClearCommand::class); }); Artisan::command('test:c', function () { $this->call($this->laravel->make(ViewClearCommand::class)); }); }); parent::setUp(); } #[TestWith(['test:a'])] #[TestWith(['test:b'])] #[TestWith(['test:c'])] public function testItCanCallCommands(string $command): void { $this->artisan($command)->assertSuccessful(); } }