koel/tests/CreatesApplication.php

34 lines
620 B
PHP
Raw Normal View History

2017-02-14 06:53:02 +00:00
<?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;
}
}