Updated some tests, fixed some bugs.

This commit is contained in:
James Cole
2014-12-13 09:36:30 +01:00
parent 7350b1da1b
commit 7af55b7268
9 changed files with 193 additions and 66 deletions

View File

@@ -1,8 +1,24 @@
<?php
// This is global bootstrap for autoloading
$db = realpath(__DIR__ . '/_data') . '/testing.sqlite';
$db = realpath(__DIR__ . '/_data') . '/testing.sqlite';
if (!file_exists($db)) {
exec('touch ' . $db);
exec('php artisan migrate --seed --env=testing');
}
exec('cp ' . $db . ' ' . realpath(__DIR__ . '/_data') . '/clean.sqlite');
/**
* Class resetToClean
* @SuppressWarnings("CamelCase")
*/
class resetToClean
{
/**
*
*/
static public function clean()
{
exec('cp ' . realpath(__DIR__ . '/_data') . '/clean.sqlite ' . realpath(__DIR__ . '/_data') . '/testing.sqlite');
}
}