Correcting test for Config.class.php

The constant used to load config file i.e CONFIG_FILE was config.inc.php while it did not exist in code base, which was causing two similar test-case with no config-file.
CONFIG_FILE has been replaced with "config.sample.inc.php" which can be tested for.
 
Signed-off-by: A V Minhaz <minhazav@gmail.com>
This commit is contained in:
minhaz 2014-03-04 00:49:57 +05:30
parent 34a11a06fb
commit f580c8fb94

View File

@ -46,7 +46,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
$this->object = new PMA_Config;
$GLOBALS['server'] = 0;
$_SESSION['is_git_revision'] = true;
$GLOBALS['PMA_Config'] = new PMA_Config(CONFIG_FILE);
$GLOBALS['PMA_Config'] = new PMA_Config("./config.sample.inc.php");
}
/**
@ -958,7 +958,9 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
//load file permissions for the current permissions file
$perms = @fileperms($GLOBALS['PMA_Config']->getSource());
//testing for permissions
$this->assertTrue(!($perms === false) && ($perms & 2));
//if the above assertion is true then applying further assertions
if(!($perms === false) && ($perms & 2)) {
$this->assertFalse($GLOBALS['PMA_Config']->get('PMA_IS_WINDOWS') == 0);