コード例 #1
0
 public function setUp()
 {
     parent::setUpWithEnv('production');
     $this->assertSecurityConfigured();
     $this->_helper = new Application_View_Helper_AdminMenu();
     $this->_helper->setView(Zend_Registry::get('Opus_View'));
 }
コード例 #2
0
 /**
  * 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
0
 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
0
 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
0
ファイル: FileTest.php プロジェクト: KOBV/opus4-matheon
 public function setUp()
 {
     parent::setUpWithEnv('production');
     $this->assertSecurityConfigured();
 }
コード例 #6
0
 private function checkMode($mode)
 {
     parent::setUpWithEnv($mode);
     $this->dispatch('/home');
     $this->assertContains('id="appmode-' . $mode . '"', $this->getResponse()->getBody());
 }