Trying to unfuck the TestCase

A lot has changed between versions

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-11-30 20:46:44 -08:00
parent f3f6a04c43
commit d8234d5a0b

View file

@ -1,10 +1,40 @@
<?php
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();
}
}