CaiWuXiTong/tests/Feature/Installation/ApplicationReadyTest.php

22 lines
591 B
PHP

<?php
namespace Tests\Feature\Installation;
use Tests\TestCase;
class ApplicationReadyTest extends TestCase
{
public function test_ready_command_requires_installed_application_and_database_connection(): void
{
config(['app.installed' => true]);
$this->artisan('app:ready')->assertSuccessful();
}
public function test_ready_command_rejects_uninstalled_application(): void
{
config(['app.installed' => false]);
$this->artisan('app:ready')
->assertExitCode(\App\Console\Commands\ApplicationReady::EXIT_NOT_INSTALLED);
}
}