Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichal Čihař <mcihar@suse.cz>2012-05-14 18:01:26 +0400
committerMichal Čihař <mcihar@suse.cz>2012-05-14 18:01:26 +0400
commit69f80f473bd1322d59f4460a423f3954be57048e (patch)
treedcbcd957c68a46947f0a9816cd995988a84ee610 /test
parentde343ab837daabb12382eb05c0d09aaf557459ce (diff)
More tests for loading config file
Diffstat (limited to 'test')
-rw-r--r--test/classes/PMA_Config_test.php33
1 files changed, 28 insertions, 5 deletions
diff --git a/test/classes/PMA_Config_test.php b/test/classes/PMA_Config_test.php
index 114901c760..7fdd522747 100644
--- a/test/classes/PMA_Config_test.php
+++ b/test/classes/PMA_Config_test.php
@@ -609,14 +609,37 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
/**
* Tests loading of config file
+ *
+ * @param string $source File name of config to load
+ * @param boolean $result Expected result of loading
+ *
+ * @dataProvider configPaths
*/
- public function testLoad()
+ public function testLoad($source, $result)
{
- $this->assertFalse($this->object->load());
-
- $this->assertTrue($this->object->load('./test/test_data/config.inc.php'));
+ if ($result) {
+ $this->assertTrue($this->object->load($source));
+ } else {
+ $this->assertFalse($this->object->load($source));
+ }
+ }
- $this->assertTrue($this->object->load('./libraries/config.default.php'));
+ public function configPaths()
+ {
+ return array(
+ array(
+ './test/test_data/config.inc.php',
+ true,
+ ),
+ array(
+ './test/test_data/config-nonexisting.inc.php',
+ false,
+ ),
+ array(
+ './libraries/config.default.php',
+ true,
+ ),
+ );
}
/**