firefly-iii/tests/_bootstrap.php
2014-12-13 09:36:30 +01:00

24 lines
567 B
PHP

<?php
// This is global bootstrap for autoloading
$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');
}
}