define('_ENGINE_R_MAIN', 'lite.php');
            define('_ENGINE_R_INIT', true);
        } else {
            define('_ENGINE_R_MAIN', false);
            define('_ENGINE_R_INIT', true);
        }
    }
}
// Boot
if (_ENGINE_R_INIT) {
    // Application
    require_once 'Engine/Loader.php';
    require_once 'Engine/Application.php';
    // Create application, bootstrap, and run
    $application = new Engine_Application(array('environment' => APPLICATION_ENV, 'bootstrap' => array('path' => APPLICATION_PATH_COR . DS . 'modules' . DS . APPLICATION_NAME . DS . 'Bootstrap.php', 'class' => ucfirst(APPLICATION_NAME) . '_Bootstrap'), 'autoloaderNamespaces' => array('Zend' => APPLICATION_PATH_LIB . DS . 'Zend', 'Engine' => APPLICATION_PATH_LIB . DS . 'Engine', 'Facebook' => APPLICATION_PATH_LIB . DS . 'Facebook', 'Bootstrap' => APPLICATION_PATH_BTS, 'Plugin' => APPLICATION_PATH_PLU, 'Widget' => APPLICATION_PATH_WID)));
    Engine_Application::setInstance($application);
    Engine_Api::getInstance()->setApplication($application);
}
// config mode
if (defined('_ENGINE_R_CONF') && _ENGINE_R_CONF) {
    return;
}
// Sub apps
if (_ENGINE_R_MAIN) {
    require dirname(__FILE__) . DS . _ENGINE_R_MAIN;
    exit;
} else {
    $application->bootstrap();
    $application->run();
}
// Start trace
Exemplo n.º 2
0
 public function _before(\Codeception\TestCase $test)
 {
     // Create application, bootstrap, and run
     $this->bootstrap = new \Engine_Application(array('environment' => APPLICATION_ENV, 'bootstrap' => array('path' => APPLICATION_PATH_COR . DS . 'modules' . DS . APPLICATION_NAME . DS . 'Bootstrap.php', 'class' => ucfirst(APPLICATION_NAME) . '_Bootstrap'), 'autoloaderNamespaces' => array('Zend' => APPLICATION_PATH_LIB . DS . 'Zend', 'Engine' => APPLICATION_PATH_LIB . DS . 'Engine', 'Facebook' => APPLICATION_PATH_LIB . DS . 'Facebook', 'Bootstrap' => APPLICATION_PATH_BTS, 'Plugin' => APPLICATION_PATH_PLU, 'Widget' => APPLICATION_PATH_WID)));
     \Zend_Session::$_unitTestEnabled = true;
     \Engine_Application::setInstance($this->bootstrap);
     \Engine_Api::getInstance()->setApplication($this->bootstrap);
     $this->bootstrap->bootstrap();
     $this->client->setBootstrap($this->bootstrap);
 }