From f580c8fb9411cfd2937f94d3cfdee121f265bb74 Mon Sep 17 00:00:00 2001 From: minhaz Date: Tue, 4 Mar 2014 00:49:57 +0530 Subject: [PATCH] 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 --- test/classes/PMA_Config_test.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/classes/PMA_Config_test.php b/test/classes/PMA_Config_test.php index 4c9af24c30..e75d698aee 100644 --- a/test/classes/PMA_Config_test.php +++ b/test/classes/PMA_Config_test.php @@ -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);