Skip to content

Commit

Permalink
Correcting test for Config.class.php
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mebjas committed Mar 3, 2014
1 parent 34a11a0 commit f580c8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/classes/PMA_Config_test.php
Expand Up @@ -46,7 +46,7 @@ protected function setUp()
$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");
}

/**
Expand Down Expand Up @@ -958,7 +958,9 @@ public function testCheckPermissions()

//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);
Expand Down

0 comments on commit f580c8f

Please sign in to comment.