コード例 #1
0
 /**
  * Regression Test for OPUSVIER-2646
  */
 public function testFormManipulationForBibliography()
 {
     $this->markTestIncomplete('testing multipart formdata not yet solved');
     $config = Zend_Registry::get('Zend_Config');
     $oldval = null;
     if (isset($config->form->first->bibliographie)) {
         $oldval = $config->form->first->bibliographie;
     }
     $config->form->first->bibliographie = 0;
     $this->request->setMethod('POST')->setPost(array('documentType' => 'demo', 'MAX_FILE_SIZE' => '10240000', 'fileupload' => '', 'uploadComment' => '', 'bibliographie' => '1', 'rights' => '1', 'send' => 'Weiter zum nächsten Schritt'));
     $this->dispatch('/publish/form/upload');
     $session = new Zend_Session_Namespace('Publish');
     // undo config changes
     if (is_null($oldval)) {
         unset($config->form->first->bibliographie);
     } else {
         $config->form->first->bibliographie = $oldval;
     }
     $doc = new Opus_Document($session->documentId);
     $belongsToBibliography = $doc->getBelongsToBibliography();
     $doc->deletePermanent();
     $this->assertResponseCode(200);
     $this->assertNotContains("Es sind Fehler aufgetreten.", $this->response->getBody());
     $this->assertFalse((bool) $belongsToBibliography, 'Expected that document does not belong to bibliography');
 }
コード例 #2
0
ファイル: DocumentAdapter.php プロジェクト: alexukua/opus4
 public function isBelongsToBibliography()
 {
     return $this->document->getBelongsToBibliography();
 }