2014-02-14 22:08:19 -05:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Query
|
|
|
|
*
|
|
|
|
* Free Query Builder / Database Abstraction Layer
|
|
|
|
*
|
|
|
|
* @package Query
|
|
|
|
* @author Timothy J. Warren
|
2014-02-18 15:18:01 -05:00
|
|
|
* @copyright Copyright (c) 2012 - 2014
|
2014-02-14 22:08:19 -05:00
|
|
|
* @link https://github.com/aviat4ion/Query
|
|
|
|
* @license http://philsturgeon.co.uk/code/dbad-license
|
|
|
|
*/
|
|
|
|
|
2016-09-07 13:06:28 -04:00
|
|
|
/**
|
|
|
|
* Unit test bootstrap - Using phpunit
|
|
|
|
*/
|
|
|
|
define('QTEST_DIR', realpath(__DIR__));
|
|
|
|
define('QBASE_DIR', realpath(QTEST_DIR.'/../') . '/');
|
|
|
|
define('QDS', DIRECTORY_SEPARATOR);
|
|
|
|
|
2015-11-10 16:29:17 -05:00
|
|
|
function get_json_config()
|
|
|
|
{
|
|
|
|
$files = array(
|
|
|
|
__DIR__ . '/settings.json',
|
|
|
|
__DIR__ . '/settings.json.dist'
|
|
|
|
);
|
|
|
|
|
|
|
|
foreach($files as $file)
|
|
|
|
{
|
|
|
|
if (is_file($file))
|
|
|
|
{
|
|
|
|
return json_decode(file_get_contents($file));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2015-07-30 16:40:30 -04:00
|
|
|
$path = QTEST_DIR.QDS.'db_files'.QDS.'test_sqlite.db';
|
|
|
|
@unlink($path);
|
|
|
|
|
2018-01-19 13:43:19 -05:00
|
|
|
// End of bootstrap.php
|