@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
$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;
$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;
$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);