configure phpunit for Laravel 5.3 (#1982)

This commit is contained in:
David Bomba 2018-03-25 13:15:34 +11:00 committed by GitHub
parent ebeee03694
commit dc711be53c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,19 +1,21 @@
<?php
class TestCase extends Illuminate\Foundation\Testing\TestCase {
abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
{
/**
* The base URL to use while testing the application.
*
* @var string
*/
protected $baseUrl = 'http://localhost';
/**
* Creates the application.
*
* @return Symfony\Component\HttpKernel\HttpKernelInterface
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$unitTesting = true;
$testEnvironment = 'testing';
return require __DIR__.'/../../bootstrap/start.php';
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
return $app;
}
}