Style convention applied (incomplete), pre/post filters added for form handler
[shipsimu.git] / tests / ConfigTest.php
index a5cc32d1f8f960bc4a29d15190f66c63b3405ca8..4681f2fb3828302649e03a988e7744da442baeb3 100644 (file)
@@ -3,22 +3,22 @@
 @chdir("..");
 
 // Load config file
-require(dirname(dirname(__FILE__)) . "/inc/config.php");
+require(dirname(dirname(__FILE__)) . '/inc/config.php');
 
 // Load all include files
-require(PATH . "inc/includes.php");
+require(PATH . 'inc/includes.php');
 
 // Load all game classes
-require(PATH . "inc/classes.php");
+require(PATH . 'inc/classes.php');
 
 // Set default application
-FrameworkConfiguration::getInstance()->setConfigEntry("default_application", "ship-simu");
+FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
 
 // Set testing mode (no starter.php will be loaded!)
 define('TEST_MODE', true);
 
 // Load the PHPUnit framework
-require_once("PHPUnit/Framework.php");
+require_once('PHPUnit/Framework.php');
 
 /**
  * A test case for the configuration sub system
@@ -58,7 +58,7 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
                        $cfg = FrameworkConfiguration::getInstance();
 
                        // Now find a configuration variable that does not exist
-                       $dummy = $cfg->readConfig("does_not_exist");
+                       $dummy = $cfg->readConfig('does_not_exist');
                } catch (ConfigEntryNotFoundException $expected) {
                        // This exception was expected, so it is fine
                        $testPassed = true;
@@ -116,7 +116,7 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
                        $cfg = FrameworkConfiguration::getInstance();
 
                        // Try to read an empty configuration variable
-                       $cfg->setConfigEntry("", "will_never_be_set");
+                       $cfg->setConfigEntry("", 'will_never_be_set');
                } catch (ConfigEntryIsEmptyException $expected) {
                        // This exception was expected, so it is fine
                        $testPassed = true;
@@ -144,10 +144,10 @@ class ConfigTest extends PHPUnit_Framework_TestCase {
                        $cfg = FrameworkConfiguration::getInstance();
 
                        // Try to read an empty configuration variable
-                       $cfg->setConfigEntry("test_key", "{$value}");
+                       $cfg->setConfigEntry('test_key', "{$value}");
 
                        // Read the config entry we have just written
-                       $readValue = $cfg->readConfig("test_key");
+                       $readValue = $cfg->readConfig('test_key');
 
                        // Now test the values
                        $this->assertEquals($value, $readValue);