當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ControllerTestCase::setUpWithEnv方法代碼示例

本文整理匯總了PHP中ControllerTestCase::setUpWithEnv方法的典型用法代碼示例。如果您正苦於以下問題:PHP ControllerTestCase::setUpWithEnv方法的具體用法?PHP ControllerTestCase::setUpWithEnv怎麽用?PHP ControllerTestCase::setUpWithEnv使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ControllerTestCase的用法示例。


在下文中一共展示了ControllerTestCase::setUpWithEnv方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     parent::setUpWithEnv('production');
     $this->assertSecurityConfigured();
     $this->_helper = new Application_View_Helper_AdminMenu();
     $this->_helper->setView(Zend_Registry::get('Opus_View'));
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:7,代碼來源:AdminMenuTest.php

示例2: setUp

 /**
  * Provide clean documents and statistics table and remove temporary files.
  * Create document for counting.
  *
  * @return void
  */
 public function setUp()
 {
     parent::setUpWithEnv('production');
     $this->assertSecurityConfigured();
     $path = Zend_Registry::get('temp_dir') . '~localstat.xml';
     @unlink($path);
     $this->_document = $this->createTestDocument();
     $this->_document->setType("doctoral_thesis");
     $this->_document->store();
     //setting server globals
     $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
     $_SERVER['HTTP_USER_AGENT'] = 'bla';
     $_SERVER['REDIRECT_STATUS'] = 200;
     // create collection test document
     $this->_document_col = $this->createTestDocument();
     $this->_document_col->addCollection(new Opus_Collection(40));
     // invisible collection
     $this->_document_col->addCollection(new Opus_Collection(16214));
     // visible collection with invisible collection role
     $this->_document_col->addCollection(new Opus_Collection(1031));
     // visible collection with visible collection role
     // collection role ID = 10 (sichbar)
     $this->_document_col->addCollection(new Opus_Collection(16136));
     // versteckte Collection (Role = 10)
     $this->_document_col->addCollection(new Opus_Collection(15991));
     // sichbare Collection (Role = 10);
     $this->_document_col->setServerState('published');
     $this->_document_col->store();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:35,代碼來源:IndexControllerTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUpWithEnv('production');
     $this->assertSecurityConfigured();
     $acl = Zend_Registry::get('Opus_Acl');
     $acl->allow('guest', 'accounts');
     $this->accessControl = new Application_Controller_Action_Helper_AccessControl();
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:8,代碼來源:AccessControlTest.php

示例4: setUp

 public function setUp()
 {
     // workaround to enable security before bootstrapping
     // bootstrapping authorization twice is not possible
     parent::setUpWithEnv('production');
     $this->assertSecurityConfigured();
     $acl = Zend_Registry::get('Opus_Acl');
     $acl->allow('guest', 'accounts');
     $this->__helper = new Application_View_Helper_AccessAllowed();
     $this->__helper->setView(Zend_Registry::get('Opus_View'));
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:11,代碼來源:AccessAllowedTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUpWithEnv('production');
     $this->assertSecurityConfigured();
 }
開發者ID:KOBV,項目名稱:opus4-matheon,代碼行數:5,代碼來源:FileTest.php

示例6: checkMode

 private function checkMode($mode)
 {
     parent::setUpWithEnv($mode);
     $this->dispatch('/home');
     $this->assertContains('id="appmode-' . $mode . '"', $this->getResponse()->getBody());
 }
開發者ID:belapp,項目名稱:opus4-application,代碼行數:6,代碼來源:AppModeTest.php


注:本文中的ControllerTestCase::setUpWithEnv方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。