Trying to unfuck the TestCase
A lot has changed between versions Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
f3f6a04c43
commit
d8234d5a0b
1 changed files with 35 additions and 5 deletions
|
@ -1,10 +1,40 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Tests;
|
namespace Tests;
|
||||||
|
|
||||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
abstract class TestCase extends BaseTestCase
|
class TestCase extends TestCase
|
||||||
{
|
{
|
||||||
use CreatesApplication;
|
/**
|
||||||
}
|
* The base URL to use while testing the application.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $baseUrl = 'http://localhost:8000';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the application.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Foundation\Application
|
||||||
|
*/
|
||||||
|
public function createApplication()
|
||||||
|
{
|
||||||
|
$app = require __DIR__.'/../bootstrap/app.php';
|
||||||
|
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||||
|
return $app;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function setUp() : void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
\Artisan::call('migrate:fresh');
|
||||||
|
$this->seed();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function tearDown() : void
|
||||||
|
{
|
||||||
|
//Artisan::call('migrate:reset');
|
||||||
|
parent::tearDown();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue