Update tests to remove the dependancy to configuration
Change the databases to be unique by test file git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2670 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -5,14 +5,6 @@ spl_autoload_register(function ($class) {
|
||||
});
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
file_put_contents ("Tests/dblayerSqliteTest.php",
|
||||
str_replace ("{ENGINE}", "sqlite",
|
||||
@@ -24,24 +16,4 @@ file_put_contents ("Tests/dblayerPostgreSQLTest.php",
|
||||
str_replace ("{ENGINE}", "pgsql",
|
||||
file_get_contents ("Tests/dblayerComplet.php")));
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user