mirror of
https://github.com/koel/koel
synced 2024-11-24 21:23:06 +00:00
34 lines
620 B
PHP
34 lines
620 B
PHP
|
<?php
|
||
|
|
||
|
namespace Tests;
|
||
|
|
||
|
use Illuminate\Contracts\Console\Kernel;
|
||
|
|
||
|
trait CreatesApplication
|
||
|
{
|
||
|
protected $coverPath;
|
||
|
|
||
|
/**
|
||
|
* The base URL to use while testing the application.
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $baseUrl = 'http://localhost';
|
||
|
|
||
|
/**
|
||
|
* Creates the application.
|
||
|
*
|
||
|
* @return \Illuminate\Foundation\Application
|
||
|
*/
|
||
|
public function createApplication()
|
||
|
{
|
||
|
$app = require __DIR__.'/../bootstrap/app.php';
|
||
|
|
||
|
$app->make(Kernel::class)->bootstrap();
|
||
|
|
||
|
$this->coverPath = $app->basePath().'/public/img/covers';
|
||
|
|
||
|
return $app;
|
||
|
}
|
||
|
}
|