mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Laravel 5 test case
This commit is contained in:
parent
f26bd1221b
commit
09532b6e36
@ -6,24 +6,18 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
/**
|
||||
* Creates the application.
|
||||
*
|
||||
* @return Symfony\Component\HttpKernel\HttpKernelInterface
|
||||
* @return \Illuminate\Foundation\Application
|
||||
*/
|
||||
public function createApplication()
|
||||
{
|
||||
$unitTesting = true;
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
|
||||
|
||||
$testEnvironment = 'testing';
|
||||
$app['config']->set('cache.default', 'array');
|
||||
|
||||
$result = require __DIR__.'/../bootstrap/start.php';
|
||||
$app->setLocale('en');
|
||||
|
||||
/*
|
||||
* Use the array driver during the unit testing
|
||||
*/
|
||||
Config::set('cache.driver', 'array');
|
||||
|
||||
App::setLocale('en');
|
||||
|
||||
return $result;
|
||||
return $app;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user