Rewrite:
authorRoland Häder <roland@mxchange.org>
Sun, 13 Aug 2017 18:36:12 +0000 (20:36 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 13 Aug 2017 18:36:12 +0000 (20:36 +0200)
- the configuration instance is now instanciated by
  FrameworkBootstrap::getConfigurationInstance(), this *may* has made it sure
  that the class FrameworkConfiguration can be fully covered by unit tests.
- still a call-back instance test is pending

Signed-off-by: Roland Häder <roland@mxchange.org>
17 files changed:
application/tests/class_ApplicationHelper.php
application/tests/config.php
framework/bootstrap/class_FrameworkBootstrap.php
framework/config-global.php
framework/config/class_FrameworkConfiguration.php
framework/loader/class_ClassLoader.php
framework/main/classes/class_BaseFrameworkSystem.php
framework/main/classes/factories/objects/class_ObjectFactory.php
framework/main/classes/factories/stacks/class_FileStackFactory.php
framework/main/classes/factories/user/class_UserFactory.php
framework/main/classes/feature/class_FrameworkFeature.php
framework/main/classes/language/class_LanguageSystem.php
framework/main/classes/output/console/class_ConsoleOutput.php
framework/main/classes/tools/console/class_ConsoleTools.php
index.php
tests/bootstrap.php
tests/framework/config/FrameworkConfigurationTest.php

index 6b234b4..cc0f574 100644 (file)
@@ -4,7 +4,6 @@ namespace CoreFramework\Helper\Application;
 
 // Import framework stuff
 use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Loader\ClassLoader;
 use CoreFramework\Manager\ManageableApplication;
@@ -176,7 +175,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica
         */
        public function initApplication () {
                // Get config instance
-               $cfg = FrameworkConfiguration::getSelfInstance();
+               $cfg = FrameworkBootstrap::getConfigurationInstance();
 
                // Initialize output system
                self::createDebugInstance('ApplicationHelper');
index 0574a8d..3a0ee3e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 
 /**
  * Configuration entries for this application only
@@ -25,7 +25,7 @@ use CoreFramework\Configuration\FrameworkConfiguration;
  */
 
 // Some hub-specific configuration like port hostname where we will listen, etc.
-$cfg = FrameworkConfiguration::getSelfInstance();
+$cfg = FrameworkBootstrap::getConfigurationInstance();
 
 // CFG: DEFAULT-CONSOLE-COMMAND
 $cfg->setConfigEntry('default_console_command', 'main');
index a37c6bf..2b79f2c 100644 (file)
@@ -63,6 +63,11 @@ final class FrameworkBootstrap {
         */
        private static $responseInstance = NULL;
 
+       /**
+        * Instance of a FrameworkConfiguration class
+        */
+       private static $configurationInstance = NULL;
+
        /*
         * Includes applications may have. They will be tried in the given order,
         * some will become soon deprecated.
@@ -97,6 +102,22 @@ final class FrameworkBootstrap {
        }
 
        /**
+        * Some "getter" for a configuration instance, making sure, it is unique
+        *
+        * @return      $configurationInstance  An instance of a FrameworkConfiguration class
+        */
+       public static function getConfigurationInstance () {
+               // Is the instance there?
+               if (is_null(self::$configurationInstance)) {
+                       // Init new instance
+                       self::$configurationInstance = new FrameworkConfiguration();
+               } // END - if
+
+               // Return it
+               return self::$configurationInstance;
+       }
+
+       /**
         * Getter for request instance
         *
         * @return      $requestInstance        An instance of a Requestable class
@@ -277,8 +298,8 @@ final class FrameworkBootstrap {
         */
        public static function prepareApplication () {
                // Configuration entry 'detected_app_name' must be set, get it here, including full path
-               $application = FrameworkConfiguration::getSelfInstance()->getConfigEntry('detected_app_name');
-               $fullPath    = FrameworkConfiguration::getSelfInstance()->getConfigEntry('detected_full_app_path');
+               $application = self::getConfigurationInstance()->getConfigEntry('detected_app_name');
+               $fullPath    = self::getConfigurationInstance()->getConfigEntry('detected_full_app_path');
 
                /*
                 * Now check and load all files, found deprecated files will throw a
@@ -325,7 +346,7 @@ final class FrameworkBootstrap {
         */
        public static function startApplication () {
                // Configuration entry 'detected_app_name' must be set, get it here
-               $application = FrameworkConfiguration::getSelfInstance()->getConfigEntry('detected_app_name');
+               $application = self::getConfigurationInstance()->getConfigEntry('detected_app_name');
 
                // Is there an application helper instance?
                $applicationInstance = call_user_func_array(
@@ -383,7 +404,7 @@ final class FrameworkBootstrap {
                } // END - if
 
                // Initialize database layer
-               $databaseInstance = ObjectFactory::createObjectByConfiguredName(FrameworkConfiguration::getSelfInstance()->getConfigEntry('database_type') . '_class');
+               $databaseInstance = ObjectFactory::createObjectByConfiguredName(self::getConfigurationInstance()->getConfigEntry('database_type') . '_class');
 
                // Prepare database instance
                $connectionInstance = DatabaseConnection::createDatabaseConnection(DebugMiddleware::getSelfInstance(), $databaseInstance);
@@ -550,7 +571,7 @@ final class FrameworkBootstrap {
         */
        private static function scanFrameworkClasses () {
                // Include the class loader function
-               require FrameworkConfiguration::getSelfInstance()->getConfigEntry('framework_base_path') . 'loader/class_ClassLoader.php';
+               require self::getConfigurationInstance()->getConfigEntry('framework_base_path') . 'loader/class_ClassLoader.php';
 
                // Register auto-load function with the SPL
                spl_autoload_register('CoreFramework\Loader\ClassLoader::autoLoad');
@@ -619,7 +640,7 @@ final class FrameworkBootstrap {
                // Construct FQPN (Full-Qualified Path Name) for ApplicationHelper class
                $applicationPath = sprintf(
                        '%s%s%s',
-                       FrameworkConfiguration::getSelfInstance()->getConfigEntry('application_base_path'),
+                       self::getConfigurationInstance()->getConfigEntry('application_base_path'),
                        $application,
                        DIRECTORY_SEPARATOR
                );
@@ -632,8 +653,8 @@ final class FrameworkBootstrap {
                } // END - if
 
                // Set the detected application's name and full path for later usage
-               FrameworkConfiguration::getSelfInstance()->setConfigEntry('detected_full_app_path', $applicationPath);
-               FrameworkConfiguration::getSelfInstance()->setConfigEntry('detected_app_name'     , $application);
+               self::getConfigurationInstance()->setConfigEntry('detected_full_app_path', $applicationPath);
+               self::getConfigurationInstance()->setConfigEntry('detected_app_name'     , $application);
        }
        /**
         * Setter for request instance
index bf73426..bd16231 100644 (file)
@@ -1,6 +1,5 @@
 <?php
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\EntryPoint\ApplicationEntryPoint;
 
@@ -30,7 +29,7 @@ use CoreFramework\EntryPoint\ApplicationEntryPoint;
  */
 
 // Get a new configuration instance
-$cfg = FrameworkConfiguration::getSelfInstance();
+$cfg = FrameworkBootstrap::getConfigurationInstance();
 
 // CFG: ROOT-BASE-PATH
 $cfg->setConfigEntry('root_base_path', ApplicationEntryPoint::getRootPath() . DIRECTORY_SEPARATOR);
index 82d50bf..0826076 100644 (file)
@@ -48,12 +48,7 @@ class FrameworkConfiguration implements Registerable {
         * hard-coded configuration data and might be overwritten/extended by
         * config data from the database.
         */
-       private $config = array();
-
-       /**
-        * The configuration instance itself
-        */
-       private static $configInstance = NULL;
+       private static $config = array();
 
        /**
         * Call-back instance (unused)
@@ -66,11 +61,12 @@ class FrameworkConfiguration implements Registerable {
        const EXCEPTION_CONFIG_VALUE_TYPE_UNSUPPORTED = 0x132;
 
        /**
-        * Private constructor
+        * Default constructor, the configuration entries are static, not the
+        * whole instance.
         *
         * @return      void
         */
-       private function __construct () {
+       public function __construct () {
                // Empty for now
        }
 
@@ -84,22 +80,6 @@ class FrameworkConfiguration implements Registerable {
        }
 
        /**
-        * Getter for a singleton instance of this class
-        *
-        * @return      $configInstance         A singleton instance of this class
-        */
-       public static final function getSelfInstance () {
-               // is the instance there?
-               if (is_null(self::$configInstance)) {
-                       // Create a config instance
-                       self::$configInstance = new FrameworkConfiguration();
-               } // END - if
-
-               // Return singleton instance
-               return self::$configInstance;
-       }
-
-       /**
         * Checks whether the given configuration key is set
         *
         * @param       $configKey      The configuration key we shall check
@@ -121,7 +101,7 @@ class FrameworkConfiguration implements Registerable {
                }
 
                // Is it set?
-               $isset = ((isset($this->config[$configKey])) || (array_key_exists($configKey, $this->config)));
+               $isset = ((isset(self::$config[$configKey])) || (array_key_exists($configKey, self::$config)));
 
                // Return the result
                return $isset;
@@ -159,7 +139,7 @@ class FrameworkConfiguration implements Registerable {
                } // END - if
 
                // Return the requested value
-               return $this->config[$configKey];
+               return self::$config[$configKey];
        }
 
        /**
@@ -193,10 +173,10 @@ class FrameworkConfiguration implements Registerable {
 
                // Set the configuration value
                //* NOISY-DEBUG: */ print(__METHOD__ . ':configEntry=' . $configKey . ',configValue[' . gettype($configValue) . ']=' . $configValue . PHP_EOL);
-               $this->config[$configKey] = $configValue;
+               self::$config[$configKey] = $configValue;
 
                // Resort the array
-               ksort($this->config);
+               ksort(self::$config);
        }
 
        /**
@@ -206,7 +186,7 @@ class FrameworkConfiguration implements Registerable {
         */
        public final function getConfigurationArray () {
                // Return it
-               return $this->config;
+               return self::$config;
        }
 
        /**
@@ -242,7 +222,7 @@ class FrameworkConfiguration implements Registerable {
                } // END - if
 
                // Unset it
-               unset($this->config[$configKey]);
+               unset(self::$config[$configKey]);
        }
 
        /**
index 63f6d00..5ae12d7 100644 (file)
@@ -220,7 +220,7 @@ class ClassLoader {
                $loaderInstance = self::getSelfInstance();
 
                // Get config instance
-               $configInstance = FrameworkConfiguration::getSelfInstance();
+               $configInstance = FrameworkBootstrap::getConfigurationInstance();
 
                // Load all classes
                foreach (self::$frameworkPaths as $shortPath) {
@@ -269,7 +269,7 @@ class ClassLoader {
                $loaderInstance = self::getSelfInstance();
 
                // Get config instance
-               $configInstance = FrameworkConfiguration::getSelfInstance();
+               $configInstance = FrameworkBootstrap::getConfigurationInstance();
 
                // Load all classes for the application
                foreach (self::$frameworkPaths as $shortPath) {
@@ -310,7 +310,7 @@ class ClassLoader {
                //* NOISY-DEBUG: */ printf('[%s:%d]: CALLED!' . PHP_EOL, __METHOD__, __LINE__);
 
                // Get config instance
-               $configInstance = FrameworkConfiguration::getSelfInstance();
+               $configInstance = FrameworkBootstrap::getConfigurationInstance();
 
                // Load all classes for the application
                foreach (self::$testPaths as $shortPath) {
@@ -399,7 +399,7 @@ class ClassLoader {
                // Is the instance there?
                if (is_null(self::$selfInstance)) {
                        // Get a new one
-                       self::$selfInstance = ClassLoader::createClassLoader(FrameworkConfiguration::getSelfInstance());
+                       self::$selfInstance = ClassLoader::createClassLoader(FrameworkBootstrap::getConfigurationInstance());
                } // END - if
 
                // Return the instance
index 2d9aa98..f88b8d3 100644 (file)
@@ -466,7 +466,7 @@ class BaseFrameworkSystem extends stdClass implements FrameworkInterface {
                // Set configuration instance if no registry ...
                if (!$this instanceof Register) {
                        // ... because registries doesn't need to be configured
-                       $this->setConfigInstance(FrameworkConfiguration::getSelfInstance());
+                       $this->setConfigInstance(FrameworkBootstrap::getConfigurationInstance());
                } // END - if
 
                // Is the startup time set? (0 cannot be true anymore)
@@ -1853,7 +1853,7 @@ Loaded includes:
                        // Try it
                        try {
                                // Get a debugger instance
-                               $debugInstance = DebugMiddleware::createDebugMiddleware(FrameworkConfiguration::getSelfInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_class'), $className);
+                               $debugInstance = DebugMiddleware::createDebugMiddleware(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_class'), $className);
                        } catch (NullPointerException $e) {
                                // Didn't work, no instance there
                                exit(sprintf('Cannot create debugInstance! Exception=%s,message=%s,className=%s,lineNumber=%d' . PHP_EOL, $e->__toString(), $e->getMessage(), $className, $lineNumber));
@@ -3299,7 +3299,7 @@ Loaded includes:
         */
         protected static function createTempPathForFile (SplFileInfo $infoInstance) {
                // Get config entry
-               $basePath = FrameworkConfiguration::getSelfInstance()->getConfigEntry('temp_file_path');
+               $basePath = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('temp_file_path');
 
                // Is the path writeable?
                if (!is_writable($basePath)) {
index ebde624..2701ede 100644 (file)
@@ -3,7 +3,7 @@
 namespace CoreFramework\Factory;
 
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Generic\EmptyVariableException;
 use CoreFramework\Loader\NoClassException;
 
@@ -97,7 +97,7 @@ class ObjectFactory extends BaseFactory {
         */
        public static final function createObjectByConfiguredName ($configEntry, array $args = array()) {
                // Read the configuration entry
-               $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry($configEntry);
+               $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configEntry);
 
                // Send this to the other factory...
                $objectInstance = self::createObjectByName($className, $args);
index 957810f..6ce4332 100644 (file)
@@ -3,7 +3,7 @@
 namespace CoreFramework\Factory\Stack;
 
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Registry\Registry;
 
@@ -50,10 +50,10 @@ class FileStackFactory extends ObjectFactory {
        public static final function createFileStackInstance ($prefix, $stackName) {
                // Construct file stack name
                $stackFileName = sprintf('%s%s/%s.%s',
-                       FrameworkConfiguration::getSelfInstance()->getConfigEntry('framework_base_path'),
-                       FrameworkConfiguration::getSelfInstance()->getConfigEntry('base_file_stacks_path'),
+                       FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('framework_base_path'),
+                       FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('base_file_stacks_path'),
                        $stackName,
-                       FrameworkConfiguration::getSelfInstance()->getConfigEntry('file_stacks_extension')
+                       FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('file_stacks_extension')
                );
 
                // If there is no handler?
index 3e15d02..8060211 100644 (file)
@@ -3,7 +3,7 @@
 namespace CoreFramework\Factory\User;
 
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Registry\Registry;
 use CoreFramework\Request\Requestable;
@@ -59,13 +59,13 @@ class UserFactory extends ObjectFactory {
                        // Probe on member instance
                        try {
                                // Get class name
-                               $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('user_class');
+                               $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('user_class');
 
                                // Try to instance it
                                $userInstance = call_user_func_array(array($className, 'createMemberByRequest'), array($requestInstance));
                        } catch (UnexpectedGuestAccountException $e) {
                                // Then try it with guest account
-                               $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry('guest_class');
+                               $className = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('guest_class');
 
                                // Try to instance it
                                $userInstance = call_user_func_array(array($className, 'createGuestByRequest'), array($requestInstance));
index 09fa826..6f0c55c 100644 (file)
@@ -3,7 +3,7 @@
 namespace CoreFramework\Feature;
 
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Loader\NoClassException;
 use CoreFramework\Object\BaseFrameworkSystem;
@@ -80,7 +80,7 @@ class FrameworkFeature extends BaseFrameworkSystem {
                        $configKey = sprintf('enable_feature_%s', $featureName);
 
                        // Check configuration
-                       self::$enabledFeatures[$featureName]['is_enabled'] = (FrameworkConfiguration::getSelfInstance()->getConfigEntry($configKey) === 'Y');
+                       self::$enabledFeatures[$featureName]['is_enabled'] = (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry($configKey) === 'Y');
                } // END - if
 
                // Return "cached" status
index 6e77500..657c113 100644 (file)
@@ -3,7 +3,7 @@
 namespace CoreFramework\Localization;
 
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Object\BaseFrameworkSystem;
 use CoreFramework\Registry\Registerable;
 use CoreFramework\Registry\Registry;
@@ -113,7 +113,7 @@ class LanguageSystem extends BaseFrameworkSystem implements ManageableLanguage,
                $langInstance->initLanguageStrings();
 
                // Set language code from default config
-               $langInstance->setLanguageCode(FrameworkConfiguration::getSelfInstance()->getConfigEntry('default_lang'));
+               $langInstance->setLanguageCode(FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('default_lang'));
 
                // Remember this instance
                self::$selfInstance = $langInstance;
index 52e6bc7..f7dbd4b 100644 (file)
@@ -3,7 +3,7 @@
 namespace CoreFramework\Output;
 
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Generic\UnsupportedOperationException;
 use CoreFramework\Output\BaseOutput;
 use CoreFramework\Stream\Output\OutputStreamer;
@@ -81,7 +81,7 @@ class ConsoleOutput extends BaseOutput implements OutputStreamer {
        public static final function getInstance() {
                // Is the self-instance already set?
                if (is_null(self::$consoleInstance)) {
-                       $contentType = FrameworkConfiguration::getSelfInstance()->getConfigEntry('web_content_type');
+                       $contentType = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('web_content_type');
                        self::$consoleInstance = ConsoleOutput::createConsoleOutput($contentType);
                } // END - if
 
index d730677..a5d50ba 100644 (file)
@@ -3,7 +3,7 @@
 namespace CoreFramework\Console\Tools;
 
 // Import framework stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Filesystem\FileNotFoundException;
 use CoreFramework\Generic\FrameworkException;
@@ -55,7 +55,7 @@ class ConsoleTools extends BaseFrameworkSystem {
                parent::__construct(__CLASS__);
 
                // Cache configuration entry
-               self::$quietResolver = FrameworkConfiguration::getSelfInstance()->getConfigEntry('quiet_dns_resolver');
+               self::$quietResolver = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('quiet_dns_resolver');
        }
 
        /**
index c5ab7dd..6ac8011 100644 (file)
--- a/index.php
+++ b/index.php
@@ -4,7 +4,6 @@ namespace CoreFramework\EntryPoint;
 
 // Import framework stuff
 use CoreFramework\Bootstrap\FrameworkBootstrap;
-use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Filesystem\FileNotFoundException;
 use CoreFramework\Helper\Application\ApplicationHelper;
@@ -75,7 +74,7 @@ final class ApplicationEntryPoint {
                } // END - if
 
                // Get config instance
-               $configInstance = FrameworkConfiguration::getSelfInstance();
+               $configInstance = FrameworkBootstrap::getConfigurationInstance();
 
                // Do we have debug installation?
                if (($configInstance->getConfigEntry('product_install_mode') == 'productive') || ($silentMode === true)) {
index de3ab8e..7b102e0 100644 (file)
@@ -1,7 +1,6 @@
 <?php
-
 // Import needed stuff
-use CoreFramework\Configuration\FrameworkConfiguration;
+use CoreFramework\Bootstrap\FrameworkBootstrap;
 
 /*
  * Copyright (C) 2017 Roland Haeder<roland@mxchange.org>
@@ -45,4 +44,4 @@ if (extension_loaded('xdebug')) {
 require dirname(__DIR__) . '/vendor/autoload.php';
 
 // Quiet DNS resolver as this is not wanted here
-FrameworkConfiguration::getSelfInstance()->setConfigEntry('quiet_dns_resolver', TRUE);
+FrameworkBootstrap::getConfigurationInstance()->setConfigEntry('quiet_dns_resolver', TRUE);
index 4de7bbc..42040b7 100644 (file)
@@ -1,9 +1,10 @@
 <?php
-
 // Same namespace as target class
 namespace CoreFramework\Configuration;
 
 // Inport framework stuff
+use CoreFramework\Bootstrap\FrameworkBootstrap;
+use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Loader\ClassLoader;
 use CoreFramework\Generic\NullPointerException;
 use CoreFramework\Generic\UnsupportedOperationException;
@@ -64,7 +65,7 @@ class FrameworkConfigurationTest extends TestCase {
                parent::setUpBeforeClass();
 
                // Init instance
-               self::$configInstance = FrameworkConfiguration::getSelfInstance();
+               self::$configInstance = FrameworkBootstrap::getConfigurationInstance();
 
                /*
                 * Disable strict naming-convention check in own class loader, because
@@ -92,7 +93,7 @@ class FrameworkConfigurationTest extends TestCase {
         */
        public function testGettingSelfConfigInstance () {
                // Get instance
-               $dummyInstance = FrameworkConfiguration::getSelfInstance();
+               $dummyInstance = FrameworkBootstrap::getConfigurationInstance();
 
                // Should be equal to own instance
                $this->assertEquals(self::$configInstance, $dummyInstance);
@@ -103,7 +104,7 @@ class FrameworkConfigurationTest extends TestCase {
         */
        public function testEqualsConfigInstance () {
                // Get instance
-               $dummyInstance = FrameworkConfiguration::getSelfInstance();
+               $dummyInstance = new FrameworkConfiguration();
 
                // Should return TRUE
                $this->assertTrue(self::$configInstance->equals($dummyInstance));
@@ -114,7 +115,7 @@ class FrameworkConfigurationTest extends TestCase {
         */
        public function testHashCodeConfigInstance () {
                // Get instance
-               $dummyInstance = FrameworkConfiguration::getSelfInstance();
+               $dummyInstance = FrameworkBootstrap::getConfigurationInstance();
 
                // Get hash code from both
                $hashCodeExpected = self::$configInstance->hashCode();
@@ -152,7 +153,7 @@ class FrameworkConfigurationTest extends TestCase {
         */
        public function testSameConfigurationArrayGetter () {
                // Get instance
-               $dummyInstance = FrameworkConfiguration::getSelfInstance();
+               $dummyInstance = FrameworkBootstrap::getConfigurationInstance();
 
                // Get it from both instances
                $config1 = self::$configInstance->getConfigurationArray();