Commit b07fd6ab authored by efalcy's avatar efalcy

hotline#100972 fix update thesaurus facets

parent aab535be
Pipeline #10159 passed with stage
in 45 minutes and 31 seconds
......@@ -561,16 +561,16 @@ class KohaRecordIntegrationBdMilleniumWithAuthorityTest extends KohaRecordIntegr
public function codifThesaurusIdOrigineShouldBeTrilogie() {
$this->assertNotNull(Class_CodifThesaurus::findFirstBy(['code' => 'MOTC',
'id_thesaurus' => 'MOTC0001',
'id_origine' => 'TRILOGIE',
'id_origine' => '37483',
'libelle' => 'Trilogie',
]));
}
/** @test */
public function codifThesaurusIdOrigineShouldNotBe37483() {
public function codifThesaurusIdOrigineShouldNotBeTrilogie() {
$this->assertNull(Class_CodifThesaurus::findFirstBy(['code' => 'MOTC',
'id_origine' => '37483',
'id_origine' => 'TRILOGIE',
]));
}
}
......
......@@ -121,10 +121,10 @@ class Class_Cosmogramme_Integration_Record_BibliographicDynamicFacets_Authority
if (!$heading = $datas['heading'])
return $children;
$children[] = $child = $this->_thesaurus->getOrCreateChild(strtoupper($heading), $heading);
if (!$record_id = $datas['record_id'])
return $children;
return $children[] = $this->_thesaurus->getOrCreateChild(strtoupper($heading), $heading);
$children[] = $child = $this->_thesaurus->getOrCreateChild($datas['record_id'], $heading);
foreach($this->_index_systems as $system)
$system->ensureRecordForThesaurus($heading, $record_id, $this->_thesaurus, $this->_int_bib, $child);
......
......@@ -710,6 +710,12 @@ class AuthoritiesBibliographicDynamicFacetsWithIndexSystemAlreadyExistingTest ex
}
/** @test */
public function thesaurusIdOrigineShouldBe21399() {
$this->assertEquals('213399', $this->_thesaurus->getIdOrigine());
}
/** @test */
public function thesaurusLabelShouldBeManga() {
$this->assertEquals('Manga', $this->_thesaurus->getLibelle());
......
Markdown is supported
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