本文整理汇总了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'));
}
示例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();
}
示例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();
}
示例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'));
}
示例5: setUp
public function setUp()
{
parent::setUpWithEnv('production');
$this->assertSecurityConfigured();
}
示例6: checkMode
private function checkMode($mode)
{
parent::setUpWithEnv($mode);
$this->dispatch('/home');
$this->assertContains('id="appmode-' . $mode . '"', $this->getResponse()->getBody());
}