Skip to content
Snippets Groups Projects
Commit c2a77b8d authored by efalcy's avatar efalcy
Browse files

Dublin core identifier : ajout url_identifier

parent 4c4e969e
No related merge requests found
......@@ -42,14 +42,18 @@ class Class_Notice_DublinCoreVisitor {
public function xml() {
return $this->_builder->oai_dc(
$this->_builder->identifier($this->_identifier)
$this->_builder->identifier($this->_url_identifier)
. $this->_xml);
}
public function visitClefAlpha($clef) {
$this->_identifier = sprintf('oai:%s:%s',
$_SERVER['SERVER_NAME'], $clef);
$this->_url_identifier = sprintf('http://%s%s/recherche/viewnotice/clef/%s',
$_SERVER['SERVER_NAME'], BASE_URL, $clef);
}
......
......@@ -85,7 +85,7 @@ class DublinCoreVisitorPotterTest extends DublinCoreVisitorTestCase {
$this->_xpath->assertXPathContentContains(
$xml,
'//oai_dc:dc/dc:identifier',
sprintf('oai:localhost:harrypotter-sorciers',
sprintf('http://localhost%s/recherche/viewnotice/clef/harrypotter-sorciers',
BASE_URL)
);
}
......@@ -294,8 +294,7 @@ class DublinCoreVisitorSouvignyTest extends DublinCoreVisitorTestCase {
public function identifierShouldBeSouvignyBible11eme() {
$this->_xpath->assertXPathContentContains($this->_dublin_core_visitor->xml(),
'//oai_dc:dc/dc:identifier',
'oai:moulins.fr:souvigny-bible-11eme'
);
sprintf('http://moulins.fr%s/recherche/viewnotice/clef/souvigny-bible-11eme', BASE_URL));
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment