2014-11-26 14:31:12 -06:00
|
|
|
<?php
|
|
|
|
// This is global bootstrap for autoloading
|
2014-12-13 02:36:30 -06:00
|
|
|
$db = realpath(__DIR__ . '/_data') . '/testing.sqlite';
|
2014-12-06 12:47:43 -06:00
|
|
|
|
|
|
|
if (!file_exists($db)) {
|
|
|
|
exec('touch ' . $db);
|
|
|
|
exec('php artisan migrate --seed --env=testing');
|
|
|
|
}
|
2014-12-13 02:36:30 -06:00
|
|
|
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');
|
|
|
|
}
|
|
|
|
}
|