firefly-iii/tests/CreatesApplication.php
2017-08-18 21:08:51 +02:00

39 lines
732 B
PHP

<?php
/**
* CreatesApplication.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types=1);
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
/**
* Trait CreatesApplication
*
* @package Tests
*/
trait CreatesApplication
{
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__ . '/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
return $app;
}
}