Query/tests/bootstrap.php

46 lines
950 B
PHP
Raw Normal View History

2014-02-14 22:08:19 -05:00
<?php
/**
* Query
*
* Free Query Builder / Database Abstraction Layer
*
* @package Query
* @author Timothy J. Warren
* @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
*/
/**
* Unit test bootstrap - Using phpunit
*/
define('QTEST_DIR', realpath(__DIR__));
define('QBASE_DIR', realpath(QTEST_DIR.'/../') . '/');
define('QDS', DIRECTORY_SEPARATOR);
2014-02-14 22:08:19 -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;
}
2014-02-14 22:08:19 -05: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