/**
  * @deprecated since OPUS 3.0.2, the function under test is marked as deprecated
  * and will be removed in future releases
  */
 public function testMapopus3Action()
 {
     $opus3_id = 'foobar-' . rand();
     $this->_document->addIdentifierOpus3()->setValue($opus3_id);
     $doc_id = $this->_document->store();
     $this->dispatch('/frontdoor/index/mapopus3/oldId/' . $opus3_id);
     $this->assertResponseCode(302);
     $this->assertModule('frontdoor');
     $this->assertController('index');
     $this->assertAction('mapopus3');
     $response = $this->getResponse();
     $headers = $response->getHeaders();
     $this->assertEquals('Location', $headers[0]['name']);
     $this->assertStringEndsWith('/rewrite/index/id/type/opus3-id/value/' . $opus3_id, $headers[0]['value']);
     $this->checkForBadStringsInHtml($response->getBody());
 }
    $instituteCollection = $instituteCollections[0];
} else {
    $rootCollection = $institutesRole->getRootCollection();
    if (is_null($rootCollection) === true) {
        $rootCollection = $institutesRole->addRootCollection();
        $rootCollection->setVisible(1)->store();
        $institutesRole->store();
    }
    $instituteCollection = $rootCollection->addLastChild();
    $instituteCollection->setVisible(1)->setName(randString($counter++))->store();
}
$doc->addCollection($instituteCollection);
//
// Identifiers
//
$oldOpusId = $doc->addIdentifierOpus3();
$oldOpusId->setValue(randString($counter++));
// empty URN will be automaticaly replace by new URN.
$urn = $doc->addIdentifierUrn();
$urn->setValue('urn:nbn:de:kobv:nn-opus-173:' . randString($counter++));
$isbn = $doc->addIdentifierIsbn();
$isbn->setValue('978-3-86680-192-9');
$issn = $doc->addIdentifierIssn();
$issn->setValue('1234-5678');
$doc->addIdentifierOpac()->setValue(randString($counter++));
//
// DnbInstitutes
//
$dnbInstitute = new Opus_DnbInstitute();
$dnbInstitute->setName(randString($counter++) . rand())->setAddress(randString($counter++))->setCity(randString($counter++))->setPhone(randString($counter++))->setDnbContactId(randString($counter++))->setIsGrantor(1)->store();
$doc->setThesisGrantor($dnbInstitute);
    if (is_null($rootCollection) === true) {
        $rootCollection = $institutesRole->addRootCollection();
        $rootCollection->setVisible(1)->store();
        $institutesRole->store();
    }
    $instituteCollection = $rootCollection->addLastChild();
    $instituteCollection->setVisible(1)->setName($instituteName)->store();
}
$doc->addCollection($instituteCollection);
$doc->setPublishedYear('2010');
$doc->setPublishedDate('2010-09-28');
$doc->setPublisherName('The Walt Disney Company');
$doc->setPublisherPlace('Burbank, CA');
$doc->setCompletedYear('2010');
$doc->setCompletedDate('2010-09-27');
$opusThreeId = $doc->addIdentifierOpus3();
$opusThreeId->setValue('1234');
// empty URN will be automaticaly replace by new URN.
$urn = $doc->addIdentifierUrn();
$urn->setValue('urn:nbn:de:kobv:nn-opus-173');
$isbn = $doc->addIdentifierIsbn();
$isbn->setValue('978-3-86680-192-9');
$issn = $doc->addIdentifierIssn();
$issn->setValue('1234-5678');
$doc->addIdentifierOpac()->setValue('OPAC-ID 001 1237890654');
// Valid Arxiv-Identifier from ArXiv.org Homepage: http://arxiv.org/help/arxiv_identifier
$arxiv = $doc->addIdentifierArxiv();
$arxiv->setValue('arXiv:0706.0001');
// Valid DOI Identifier from DOI Homepage: http://www.doi.org/
$doi = $doc->addIdentifierDoi();
$doi->setValue('10.1000/182');
예제 #4
0
    if (is_null($rootCollection) === true) {
        $rootCollection = $institutesRole->addRootCollection();
        $rootCollection->setVisible(1)->store();
        $institutesRole->store();
    }
    $instituteCollection = $rootCollection->addLastChild();
    $instituteCollection->setVisible(1)->setName($instituteName)->store();
}
$doc->addCollection($instituteCollection);
$doc->setPublishedYear('2010');
$doc->setPublishedDate('2010-09-28');
$doc->setPublisherName('The Walt Disney Company');
$doc->setPublisherPlace('Burbank, CA');
$doc->setCompletedYear('2010');
$doc->setCompletedDate('2010-09-27');
$o3id = $doc->addIdentifierOpus3();
$o3id->setValue('1234');
// empty URN will be automaticaly replace by new URN.
$urn = $doc->addIdentifierUrn();
$urn->setValue('urn:nbn:de:kobv:nn-opus-173');
$isbn = $doc->addIdentifierIsbn();
$isbn->setValue('978-3-86680-192-9');
$issn = $doc->addIdentifierIssn();
$issn->setValue('1234-5678');
$doc->addIdentifierOpac()->setValue('OPAC-ID 001 1237890654');
// Valid Arxiv-Identifier from ArXiv.org Homepage: http://arxiv.org/help/arxiv_identifier
$arxiv = $doc->addIdentifierArxiv();
$arxiv->setValue('arXiv:0706.0001');
// Valid DOI Identifier from DOI Homepage: http://www.doi.org/
$doi = $doc->addIdentifierDoi();
$doi->setValue('10.1000/182');