2021-06-26 23:23:15 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests;
|
2017-02-04 19:58:42 +08:00
|
|
|
|
|
|
|
use Illuminate\Contracts\Console\Kernel;
|
2024-03-16 23:12:14 +08:00
|
|
|
use Illuminate\Foundation\Application;
|
2017-02-04 19:58:42 +08:00
|
|
|
|
|
|
|
trait CreatesApplication
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Creates the application.
|
|
|
|
*/
|
2024-03-16 23:12:14 +08:00
|
|
|
public function createApplication(): Application
|
2017-02-04 19:58:42 +08:00
|
|
|
{
|
2021-06-26 23:23:15 +08:00
|
|
|
$app = require __DIR__ . '/../bootstrap/app.php';
|
2017-02-04 19:58:42 +08:00
|
|
|
$app->make(Kernel::class)->bootstrap();
|
2021-06-26 23:23:15 +08:00
|
|
|
|
2017-02-04 19:58:42 +08:00
|
|
|
return $app;
|
|
|
|
}
|
2021-06-26 23:23:15 +08:00
|
|
|
}
|