X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=application%2Ftests%2Fclass_ApplicationHelper.php;h=5d3c60dc181e9128c43d84e74161d168eb441f7e;hb=da5291226d3b33102754943711ba4d6e29376ebe;hp=3d5e2c9251dfd6a889ef7a61004d228e1782d503;hpb=13e20a467def3a1ce1fb10534fa2084f1959a768;p=core.git diff --git a/application/tests/class_ApplicationHelper.php b/application/tests/class_ApplicationHelper.php index 3d5e2c92..5d3c60dc 100644 --- a/application/tests/class_ApplicationHelper.php +++ b/application/tests/class_ApplicationHelper.php @@ -5,8 +5,9 @@ namespace CoreFramework\Helper\Application; // Import framework stuff use CoreFramework\Manager\ManageableApplication; use CoreFramework\Object\BaseFrameworkSystem; +use CoreFramework\Factory\ObjectFactory; use CoreFramework\Registry\Registerable; -use CoreFramework\Registry\Generic\Registry; +use CoreFramework\Registry\Registry; use CoreFramework\Template\CompileableTemplate; /** @@ -167,7 +168,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $responseType = self::getResponseTypeFromSystem(); // Create a new request object - $requestInstance = ObjectFactory::createObjectByName(self::convertToClassName($response) . 'Request'); + $requestInstance = ObjectFactory::createObjectByName(sprintf('CoreFramework\Request\%sRequest', self::convertToClassName($response))); // Remember request instance here $this->setRequestInstance($requestInstance); @@ -180,7 +181,7 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica } // END - if // ... and a new response object - $responseClass = sprintf('%sResponse', self::convertToClassName($response)); + $responseClass = sprintf('CoreFramework\Response\%sResponse', self::convertToClassName($response)); $responseInstance = ObjectFactory::createObjectByName($responseClass, array($this)); // Remember response instance here @@ -199,7 +200,14 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica } // END - if // Get a controller resolver - $resolverClass = self::convertToClassName($this->getAppShortName() . '_' . $responseType . '_controller_resolver'); + $resolverClass = sprintf( + 'CoreFramework\Tests\Resolver\Controller\%s', + self::convertToClassName(sprintf( + '%s_%s_controller_resolver', + $this->getAppShortName(), + $responseType + )) + ); $resolverInstance = ObjectFactory::createObjectByName($resolverClass, array($commandName, $this)); // Get a controller instance as well @@ -209,11 +217,9 @@ class ApplicationHelper extends BaseFrameworkSystem implements ManageableApplica $this->getControllerInstance()->handleRequest($requestInstance, $responseInstance); // -------------------------- Shutdown phase -------------------------- - // Shutting down the hub by saying "good bye" to all connected peers - // and other hubs, flushing all queues and caches. - self::createDebugInstance(__CLASS__)->debugOutput('MAIN: Shutdown in progress, main loop exited.'); + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown in progress ...'); $this->getControllerInstance()->executeShutdownFilters($requestInstance, $responseInstance); - self::createDebugInstance(__CLASS__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)'); + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('MAIN: Shutdown completed. (This is the last line.)'); } /**