Phalcon\Test\Integration\Mvc\ApplicationCest::modulesDefinition PHP Method

modulesDefinition() public method

public modulesDefinition ( IntegrationTester $I )
$I IntegrationTester
    public function modulesDefinition(IntegrationTester $I)
    {
        $I->wantTo('handle request and get content by using single modules strategy (standard definition)');
        Di::reset();
        $_GET['_url'] = '/index';
        $di = new FactoryDefault();
        $di->set('router', function () {
            $router = new Router(false);
            $router->add('/index', ['controller' => 'index', 'module' => 'frontend', 'namespace' => 'Phalcon\\Test\\Modules\\Frontend\\Controllers']);
            return $router;
        });
        $application = new Application();
        $application->registerModules(['frontend' => ['path' => PATH_DATA . 'modules/frontend/Module.php', 'className' => 'Phalcon\\Test\\Modules\\Frontend\\Module'], 'backend' => ['path' => PATH_DATA . 'modules/backend/Module.php', 'className' => 'Phalcon\\Test\\Modules\\Backend\\Module']]);
        $application->setDI($di);
        $I->assertEquals('<html>here</html>' . PHP_EOL, $application->handle()->getContent());
    }