protected function setUp() { $configFilePath = APPLICATION_PATH . '/configs'; $configXml = new Zend_Config_Xml($configFilePath . '/config.xml', 'production'); Zend_Registry::set('config', $configXml); $this->application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini'); $this->bootstrap = array($this, 'appBootstrap'); parent::setUp(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->db = $this->getConnection()->getConnection(); \Zend_Registry::set('db', $this->db); \Zend_Db_Table::setDefaultAdapter($this->db); $settings = new \Zend_Config_Ini(GEMS_ROOT_DIR . '/configs/application.example.ini', APPLICATION_ENV); $sa = $settings->toArray(); $this->loader = new \Gems_Loader(\Zend_Registry::getInstance(), $sa['loaderDirs']); \Zend_Registry::set('loader', $this->loader); }
protected function setUp() { $this->_logger = Zend_Registry::get('logger'); $this->setupDatabase(); try { parent::setUp(); } catch (Exception $e) { // echo $e->getMessage() . PHP_EOL; // echo $e->getTraceAsString() . PHP_EOL; } }
/** Setup. */ public function setUp() { $this->bootstrap = array($this, 'appBootstrap'); $this->loadElements(); if (isset($this->enabledModules) && !empty($this->enabledModules)) { foreach ($this->enabledModules as $route) { if (file_exists(BASE_PATH . '/modules/' . $route . '/AppController.php')) { require_once BASE_PATH . '/modules/' . $route . '/AppController.php'; } if (file_exists(BASE_PATH . '/modules/' . $route . '/models/AppDao.php')) { require_once BASE_PATH . '/modules/' . $route . '/models/AppDao.php'; } if (file_exists(BASE_PATH . '/modules/' . $route . '/models/AppModel.php')) { require_once BASE_PATH . '/modules/' . $route . '/models/AppModel.php'; } } } parent::setUp(); }
protected function setUp() { $this->runAutoloadResources(); parent::setUp(); $this->profileTable = new Application_Model_DbTable_Profile(); }
public function setUp() { parent::setUp(); }
protected function setUp() { $this->application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini'); $this->bootstrap = array($this, 'appBootstrap'); parent::setUp(); }