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

OAI : set 'fre' by default for nature_doc

parent c2a77b8d
Branches
Tags
No related merge requests found
......@@ -25,7 +25,7 @@ class Class_NatureDoc {
*/
public static function langForLabel($libelle) {
$label_ids=array_flip(self::allByIdLabel());
return isset($label_ids[$libelle]) && $label_ids[$libelle] > 12 ? 'fre' : 'eng';
return isset($label_ids[$libelle]) && $label_ids[$libelle] <= 12 ? 'eng' : 'fre';
}
......
......@@ -61,7 +61,8 @@ class DublinCoreVisitorPotterTest extends DublinCoreVisitorTestCase {
->subfieldWillReturn(['210', 'c'], ['Bloomsbury Publishing'])
->subfieldWillReturn(['210', 'a'], ['Londres'])
->subfieldWillReturn(['200', 'b'], ['Manuscrit',
'Collection'])
'Collection',
'Parchemin'])
->subfieldWillReturn(['801', 'b'], ['Castagnera'])
->subfieldWillReturn(['852', 'k'], ['LV/R ROW']));
$this->_dublin_core_visitor->visit($potter);
......@@ -242,6 +243,15 @@ class DublinCoreVisitorPotterTest extends DublinCoreVisitorTestCase {
/** @test */
public function shouldHaveTypeParchemin() {
$this->_xpath->assertXPathContentContains($this->_dublin_core_visitor->xml(),
'//oai_dc:dc/dc:type[@xml:lang="fre"]',
'Parchemin');
}
/** @test */
public function shouldHaveTypeCollection() {
$this->_xpath->assertXPathContentContains($this->_dublin_core_visitor->xml(),
......
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