Created
March 8, 2018 01:40
-
-
Save jsdecena/34babe07b7ff4b24f2c3fb847fd0a0cf to your computer and use it in GitHub Desktop.
Test Case File
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Tests; | |
use Illuminate\Foundation\Testing\DatabaseMigrations; | |
use Illuminate\Foundation\Testing\DatabaseTransactions; | |
use Illuminate\Foundation\Testing\TestCase as BaseTestCase; | |
use Faker\Factory as Faker; | |
/** | |
* Class TestCase | |
* @package Tests | |
* @runTestsInSeparateProcesses | |
* @preserveGlobalState disabled | |
*/ | |
abstract class TestCase extends BaseTestCase | |
{ | |
use CreatesApplication, DatabaseMigrations, DatabaseTransactions; | |
protected $faker; | |
/** | |
* Set up the test | |
*/ | |
public function setUp() | |
{ | |
parent::setUp(); | |
$this->faker = Faker::create(); | |
} | |
/** | |
* Reset the migrations | |
*/ | |
public function tearDown() | |
{ | |
$this->artisan('migrate:reset'); | |
parent::tearDown(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment