Beispiel #1
0
 public function _before(\Codeception\TestCase $test)
 {
     $this->bootstrap = new \Zend_Application($this->config['env'], getcwd() . DIRECTORY_SEPARATOR . $this->config['config']);
     $this->bootstrap->bootstrap();
     $this->client->setBootstrap($this->bootstrap);
     $db = $this->bootstrap->getBootstrap()->getResource('db');
     if ($db instanceof \Zend_Db_Adapter_Abstract) {
         $this->db = $db;
         $this->db->getProfiler()->setEnabled(true);
         $this->db->getProfiler()->clear();
     }
 }
Beispiel #2
0
 public function _before(\Codeception\TestCase $test)
 {
     \Zend_Session::$_unitTestEnabled = true;
     $this->bootstrap = new \Zend_Application($this->config['env'], Configuration::projectDir() . $this->config['config']);
     $this->bootstrap->bootstrap();
     $this->client->setBootstrap($this->bootstrap);
     $db = $this->bootstrap->getBootstrap()->getResource('db');
     if ($db instanceof \Zend_Db_Adapter_Abstract) {
         $this->db = $db;
         $this->db->getProfiler()->setEnabled(true);
         $this->db->getProfiler()->clear();
     }
 }