lthn.io/tests/TestCase.php

22 lines
548 B
PHP
Raw Permalink Normal View History

<?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;
}
}