Laravel 5 test case

This commit is contained in:
Samuel Georges 2015-02-09 21:51:26 +11:00
parent f26bd1221b
commit 09532b6e36

View File

@ -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;
}
}