ldc-legaulois/tests/CreatesApplication.php

21 lines
376 B
PHP
Raw Permalink Normal View History

2020-07-23 10:29:36 +02:00
<?php
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
2026-09-25 16:25:31 +02:00
use Illuminate\Foundation\Application;
2020-07-23 10:29:36 +02:00
trait CreatesApplication
{
/**
* Creates the application.
*/
2026-09-25 16:25:31 +02:00
public function createApplication(): Application
2020-07-23 10:29:36 +02:00
{
$app = require __DIR__ . '/../bootstrap/app.php';
2020-07-23 10:29:36 +02:00
$app->make(Kernel::class)->bootstrap();
2026-09-25 16:25:31 +02:00
2020-07-23 10:29:36 +02:00
return $app;
}
}