diff --git a/Tests/autoload.php.dist b/Tests/autoload.php.dist index a59cf32..c0f5db4 100644 --- a/Tests/autoload.php.dist +++ b/Tests/autoload.php.dist @@ -4,3 +4,34 @@ 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