コード例 #1
0
ファイル: TestHelper.php プロジェクト: Aeryris/grid
 public function setUp()
 {
     date_default_timezone_set('Europe/Lisbon');
     $this->_temp = realpath(APPLICATION_PATH . '/../tests/_temp/') . '/';
     include_once APPLICATION_PATH . '/models/Model.php';
     // Assign and instantiate in one step:
     $this->bootstrap = new Zend_Application('general', APPLICATION_PATH . '/config.ini');
     $this->controller = Zend_Controller_Front::getInstance();
     $this->db = $this->bootstrap->getBootstrap()->getPluginResource('db')->getDbAdapter();
     $this->controller->setControllerDirectory(APPLICATION_PATH . '/application/controllers');
     $this->controller->setDefaultModule('defualt');
     $this->controller->setDefaultControllerName('site');
     $this->grid = Bvb_Grid::factory('Table');
     $this->grid->setParam('module', 'default');
     $this->grid->setParam('controller', 'site');
     $this->grid->setView(new Zend_View(array()));
     parent::setUp();
 }