Updated tests.

This commit is contained in:
James Cole
2014-12-20 15:00:53 +01:00
parent e86547645c
commit 82e438d29b
44 changed files with 2000 additions and 306 deletions

View File

@@ -1,17 +1,24 @@
<?php
//exec('php artisan migrate --seed --env=testing');
// 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")
*/
//
//
//$db = realpath(__DIR__ . '/_data') . '/testing.sqlite';
//if (!file_exists($db)) {
// echo 'Recreating database...' . "\n";
// exec('touch ' . $db);
//
//} else {
// echo 'Database exists!' . "\n";
//}
//echo 'Copy database to clean database (turned off)...' . "\n";
//exec('cp ' . $db . ' ' . realpath(__DIR__ . '/_data') . '/clean.sqlite');
//
//
///**
// * Class resetToClean
// * @SuppressWarnings("CamelCase")
// */
class resetToClean
{
/**
@@ -19,6 +26,6 @@ class resetToClean
*/
static public function clean()
{
exec('cp ' . realpath(__DIR__ . '/_data') . '/clean.sqlite ' . realpath(__DIR__ . '/_data') . '/testing.sqlite');
//exec('cp ' . realpath(__DIR__ . '/_data') . '/clean.sqlite ' . realpath(__DIR__ . '/_data') . '/testing.sqlite');
}
}