git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1652 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
38 lines
979 B
Plaintext
38 lines
979 B
Plaintext
<?php
|
|
/** Autoload */
|
|
spl_autoload_register(function ($class) {
|
|
@include $class . '.php';
|
|
});
|
|
|
|
define ("PHPUNIT", "ON-GOING");
|
|
define ("CONFIGFILE", "./Tests/configuration.php");
|
|
if (! file_exists (CONFIGFILE))
|
|
die ("No Config file found in ".CONFIGFILE."\n");
|
|
echo "Configuration file : ".CONFIGFILE."\n";
|
|
if (file_exists ("/tmp/database.db"))
|
|
{
|
|
unlink ("/tmp/database.db");
|
|
}
|
|
|
|
require_once ("domframework/config.php");
|
|
/** The class need to take care of configuration parameters */
|
|
class configuration extends config
|
|
{
|
|
/** All the default parameters in the configuration */
|
|
function __construct ()
|
|
{
|
|
$this->default = array (
|
|
"database"=>array ("dsn"=>null,
|
|
"username"=>null,
|
|
"password"=>null,
|
|
"driver_options"=>null,
|
|
"tableprefix"=>""),
|
|
);
|
|
|
|
if (defined("CONFIGFILE"))
|
|
$this->confFile = CONFIGFILE;
|
|
}
|
|
}
|
|
|
|
// vim: syntax=on filetype=php
|