/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
tests/Integration/Foundation/Console/AboutCommandTest.php
56 строк
2 KB
Alies Lapatsin
[11.x] Respect custom path for cached views by the `AboutCommand` (#55179)
27 мар 2025, 20:09
Не верифицирован
27 мар 2025, 20:09
e65c9b7
Код
Авторство
О чём код?
<?php namespace Illuminate\Tests\Integration\Foundation\Console; use Illuminate\Testing\Assert; use Orchestra\Testbench\Attributes\WithEnv; use Orchestra\Testbench\TestCase; use function Orchestra\Testbench\remote; class AboutCommandTest extends TestCase { public function testItCanDisplayAboutCommandAsJson() { $process = remote('about --json', ['APP_ENV' => 'local'])->mustRun(); tap(json_decode($process->getOutput(), true), function ($output) { Assert::assertArraySubset([ 'application_name' => 'Laravel', 'php_version' => PHP_VERSION, 'environment' => 'local', 'debug_mode' => true, 'url' => 'localhost', 'maintenance_mode' => false, ], $output['environment']); Assert::assertArraySubset([ 'config' => false, 'events' => false, 'routes' => false, ], $output['cache']); Assert::assertArraySubset([ 'broadcasting' => 'log', 'cache' => 'database', 'database' => 'testing', 'logs' => ['single'], 'mail' => 'log', 'queue' => 'database', 'session' => 'cookie', ], $output['drivers']); }); } #[WithEnv('VIEW_COMPILED_PATH', __DIR__.'/../../View/templates')] public function testItRespectsCustomPathForCompiledViews(): void { $process = remote('about --json', ['APP_ENV' => 'local'])->mustRun(); tap(json_decode($process->getOutput(), true), static function (array $output) { Assert::assertArraySubset([ 'views' => true, ], $output['cache']); }); } }