New tests and prep for future runs.

This commit is contained in:
James Cole
2015-04-20 21:57:20 +02:00
parent 7d32e50f25
commit 54125c05d3
8 changed files with 515 additions and 32 deletions

View File

@@ -29,6 +29,10 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
public function setUp()
{
parent::setUp();
// if the database copy does not exist, call migrate.
// if the database copy does not exist, create it and copy back as original.
Artisan::call('migrate');
FactoryMuffin::loadFactories(__DIR__ . '/factories');
@@ -44,10 +48,21 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
parent::setUpBeforeClass();
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
public function tearDown()
{
parent::tearDown();
// delete copy and original.
}
/**
* @param string $class
*
* @return mixed
* @return Mockery\MockInterface
*/
public function mock($class)
{