Skip to content
Snippets Groups Projects
Commit c4f8bb8e authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'hotline/17733-doc-type-recognition' into 'hotline_6.56'

Hotline/17733 doc type recognition

See merge request !528
parents 18d97860 c9592601
Branches
Tags 5.12
6 merge requests!545Master,!544Master,!543Master,!542Master,!540Hotline 6.56,!533Hotline#16604 cms urls
- ticket #17733: La reconnaissance des types de document sur le 995$r se fait
maintenant avec une comparaison exacte, au lieu d'une comparaison
"commence par"
......@@ -198,7 +198,7 @@ class profil_donnees {
$identification_codes = array_map('strtolower', array_filter($td["zone_995"]));
foreach($identification_codes as $identification_code) {
if (0 === strpos($z995[0], $identification_code))
if ($z995[0] == $identification_code)
return true;
}
return false;
......
......@@ -42,3 +42,24 @@ class NoticeIntegrationTypeDocPartitionValenceTest extends NoticeIntegrationTest
$this->assertEquals(7, Class_Notice::find(1)->getTypeDoc());
}
}
class NoticeIntegrationTypeDocMatchTest extends NoticeIntegrationTestCase {
public function getProfilDonnees() {
$profile = Class_IntProfilDonnees::forKoha()->setIdProfil(114)
->setTypeDocRecognition(4, '', 'DVD')
->setTypeDocRecognition(5, '', 'DVDA');
return $profile->getRawAttributes();
}
public function setUp() {
parent::setUp();
$this->loadNotice('unimarc_doctype_DVDA');
}
/** @test */
public function recordDocTypeShouldBe5() {
$this->assertEquals(5, Class_Notice::find(1)->getTypeDoc());
}
}
00478cam0a22001332 450000100070000000500170000703500150002407300180003901000150005709000110007210000410008320000810012499501390020532158820140415030942.0 ablv-I28707 a9788850710959 a885071095X a321588 a20071024d2006 u0frey5003 ba1 a100 mélodies célèbres d'Europe de l'EstbMusique impriméefMarc Toubiana f706254w2014-10-1860991737cBLV20k9.5 TOU52014-04-14n2014-11-15o0eMAVrDVDAm2014-10-1840bBLVzPôle Musique et Arts Vivants
\ No newline at end of file
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