Cachet/tests/CreatesApplicationTrait.php
2018-06-25 22:13:53 +01:00

37 lines
707 B
PHP

<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Tests\Cachet;
use Illuminate\Contracts\Console\Kernel;
/**
* This is the creates application trait.
*
* @author James Brooks <james@alt-three.com>
*/
trait CreatesApplicationTrait
{
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
return $app;
}
}