tests/TestCase.php bootstraps app via Core\Boot::app() with kernel bootstrap. DatabaseTransactions for test isolation. PHPUnit config with array cache/session. 12 tests written, unit tests pass. HTTP endpoint tests need chain daemon mock to run standalone. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 lines
548 B
PHP
21 lines
548 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests;
|
|
|
|
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
|
|
|
abstract class TestCase extends BaseTestCase
|
|
{
|
|
public function createApplication(): \Illuminate\Foundation\Application
|
|
{
|
|
// Same bootstrap as Core\Init — use App\Boot if exists, else Core\Boot
|
|
$bootClass = class_exists('App\\Boot') ? 'App\\Boot' : \Core\Boot::class;
|
|
|
|
$app = $bootClass::app();
|
|
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
|
|
|
return $app;
|
|
}
|
|
}
|