X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fold%2Floader-test.php;h=f87b31ae1c49d3b63e87539d187c7310e9e82321;hb=ac5339906ba6e48ed6f423606bb4fef0e7671dcc;hp=0f415eec40935ee26b2aaeef9220e6024bb488d6;hpb=2078ef5e00b12fd44558b8d6b7eb95e4a4cee4b0;p=shipsimu.git
diff --git a/tests/old/loader-test.php b/tests/old/loader-test.php
index 0f415ee..f87b31a 100644
--- a/tests/old/loader-test.php
+++ b/tests/old/loader-test.php
@@ -9,86 +9,86 @@ define('TEST_MODE', true);
require(dirname(dirname(dirname(__FILE__))) . "/inc/config.php");
// Load all include files
-require(PATH . "inc/includes.php");
+require($cfg->readConfig('base_path') . 'inc/includes.php');
// Load all game classes
-require(PATH . "inc/classes.php");
+require($cfg->readConfig('base_path') . 'inc/classes.php');
// Load file I/O handler
-require(PATH . "inc/file_io.php");
+require($cfg->readConfig('base_path') . 'inc/file_io.php');
// Load database layer
-require(PATH . "inc/database.php");
+require($cfg->readConfig('base_path') . 'inc/database.php');
// Set default application
-FrameworkConfiguration::getInstance()->setConfigEntry("default_application", "ship-simu");
-$application = "ship-simu";
+FrameworkConfiguration::getInstance()->setConfigEntry('default_application', 'ship-simu');
+$application = 'ship-simu';
// Load more includes
-require(PATH . "application/ship-simu/loader.php");
+require($cfg->readConfig('base_path') . 'application/ship-simu/loader.php');
// Wir tun hier so, als waere schon das Reederei-Objekt generiert und wir wollen
// jetzt die Personalliste wiederherstellen
try {
- $personell = SimulatorPersonell::createSimulatorPersonellByID("SimulatorPersonell@829292aeca3f6bf78c16e25fc4f75c98");
+ $personell = SimulatorPersonell::createSimulatorPersonellByID('SimulatorPersonell@829292aeca3f6bf78c16e25fc4f75c98');
} catch (InvalidIDFormatException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (FileIsEmptyException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (FilePointerNotOpenedException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (InvalidMD5ChecksumException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (InvalidDataLengthException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (InvalidSimulatorIDException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (MismatchingCompressorsException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (ContainerItemIsNullException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (ContainerItemIsNoArrayException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
} catch (ContainerMaybeDamagedException $e) {
- die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
+ die(sprintf("[Main:] Could not create personal list for follwing reason: %s
\n",
$e->getMessage()
));
}
@@ -108,15 +108,15 @@ exit();
try {
$personell = SimulatorPersonell::createSimulatorPersonell(20);
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: %s
\n",
+ die(sprintf("[Main:] Personal list not created for following reason: %s
\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: %s
\n",
+ die(sprintf("[Main:] Personal list not created for following reason: %s
\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Personal list not created for following reason: %s
\n",
+ die(sprintf("[Main:] Personal list not created for following reason: %s
\n",
$e->getMessage()
));
}
@@ -133,35 +133,27 @@ if (defined('DEBUG_PERSONELL_OBJ')) {
try {
$personell->saveObjectToDatabase();
} catch (NullPointerException $e) {
- die(sprintf("[Main:] Object not saved for following reason: %s
\n",
+ die(sprintf("[Main:] Object not saved for following reason: %s
\n",
$e->getMessage()
));
} catch (NoObjectException $e) {
- die(sprintf("[Main:] Object not saved for following reason: %s
\n",
+ die(sprintf("[Main:] Object not saved for following reason: %s
\n",
$e->getMessage()
));
} catch (InvalidObjectException $e) {
- die(sprintf("[Main:] Object not saved for following reason: %s
\n",
+ die(sprintf("[Main:] Object not saved for following reason: %s
\n",
$e->getMessage()
));
} catch (MissingMethodException $e) {
- die(sprintf("[Main:] Object not saved for following reason: %s
\n",
+ die(sprintf("[Main:] Object not saved for following reason: %s
\n",
$e->getMessage()
));
} catch (UnsupportedLimitationPartException $e) {
- die(sprintf("[Main:] Object not saved for following reason: %s
\n",
- $e->getMessage()
- ));
-} catch (GetterNotFoundException $e) {
- die(sprintf("[Main:] Object not saved for following reason: %s
\n",
- $e->getMessage()
- ));
-} catch (NoArrayCreatedException $e) {
- die(sprintf("[Main:] Object not saved for following reason: %s
\n",
+ die(sprintf("[Main:] Object not saved for following reason: %s
\n",
$e->getMessage()
));
} catch (InvalidArrayCountException $e) {
- die(sprintf("[Main:] Object not saved for following reason: %s
\n",
+ die(sprintf("[Main:] Object not saved for following reason: %s
\n",
$e->getMessage()
));
}