Skip to content
Snippets Groups Projects

Hotline#13837 Integration Microbib

Merged Laurent requested to merge hotline#13837_integration_microbib into hotline_6.45
Compare and
+ 155
52
Preferences
Compare changes
Files
@@ -31,9 +31,16 @@ abstract class NoticeIntegrationTestCase extends ModelTestCase {
$_insert_increment;
public function getProfilDonnees() {
return $this->_profil_donnees;
}
public function setupProfilDonnees() {
$this->_insert_increment = 12;
$this->_profil_donnees = $this->getProfilDonnees();
if (!isset($this->_profil_donnees))
return;
@@ -633,6 +640,14 @@ class NoticeIntegrationZanzibarTest extends NoticeIntegrationTestCase {
$this->loadNotice("unimarc_zanzibara");
}
/** @test */
public function subfield200AShouldBeZanzibaraVol8() {
$this->assertEquals('Zanzibara, vol. 8',
$this->notice_integration->get_subfield('200', 'a')[0]);
}
/** @test */
public function subfield345AShouldBeGAM() {
$this->assertEquals('GAM',
@@ -732,7 +747,7 @@ class NoticeIntegrationLearningWithRenvoisTest extends NoticeIntegrationTestCase
/** @test */
public function matiersShouldContainsFrey() {
public function auteursShouldContainsFrey() {
$this->assertContains('FREY FRAI PIERRE PIER',
$this->notice_integration->noticeToDBEnreg($this->notice_data)['auteurs']);
}
@@ -740,6 +755,89 @@ class NoticeIntegrationLearningWithRenvoisTest extends NoticeIntegrationTestCase
class NoticeIntegrationBearsBeerMicrobibTest extends NoticeIntegrationTestCase {
public function getProfilDonnees() {
return
['id_profil' => 106,
'libelle' => 'Microbib',
'accents' => '1',
'rejet_periodiques' => '1',
'id_article_periodique' => '2',
'type_fichier' => '0',
'format' => '0',
'attributs' => serialize(
[ [
'type_doc' => [
[ 'code' => '0', 'label' => '', 'zone_995' => '' ],
[ 'code' => '1', 'label' => 'am;as', 'zone_995' => 'az' ],
[ 'code' => '2', 'label' => '', 'zone_995' => ''],
[ 'code' => '3', 'label' => 'i;j;k', 'zone_995' => ''],
[ 'code' => '4', 'label' => 'g','zone_995' => ''],
[ 'code' => '5', 'label' => 'l;m', 'zone_995' => ''],
[ 'code' => '8', 'label' => '', 'zone_995' => ''],
[ 'code' => '9', 'label' => '', 'zone_995' => '' ],
[ 'code' => '10', 'label' => '', 'zone_995' => ''],
[ 'code' => '9', 'label' => '', 'zone_995' => ''],
[ 'code' => '10', 'label' => '', 'zone_995' => '']
],
'champ_code_barres' => 'f',
'champ_cote' => 'k',
'champ_type_doc' => '',
'champ_genre' => 'e',
'champ_section' => 'q',
'champ_emplacement' => 'u',
'champ_annexe' => ''
],
[ 'champs' => ''],
[ 'champs' => ''],
[ 'champs' => ''],
[ 'champs' => '', 'xml_balise_abonne' => '', 'xml_champs_abonne' => [ 'IDABON' => '',
'ORDREABON' => '',
'NOM' => '',
'PRENOM' => '',
'NAISSANCE' => '',
'PASSWORD' => '',
'MAIL' => '',
'DATE_DEBUT' => '',
'DATE_FIN' => '',
'ID_SIGB' => '' ] ],
[ 'zone' => '995', 'champ' => 's', 'format' => '3', 'jours' => '', 'valeurs' => 'nouveaute']
])];
}
public function setUp() {
parent::setUp();
$this->loadNotice("unimarc_bears_beer");
}
/** @test */
public function auteursShouldContainsBEAULIEUJIMMY() {
$this->assertEquals('BEAULIEU BOLI JIMMY JIMI APOSTOLIDES APOSTOLID JEAN JAN MARIE MARI BOSSE BOS SIMON BOUCHARD BOUCHAR GREGOIRE GREGOIR PIERRE PIER BROERSMA MATTHEW MATEW DELPORTE DELPORT JULIE JULI DOYON DOION RIVEST RIVES EKEBOM EKEBON TERHI TERI FORSYTHE FORSIT GENEST CATHERINE KATERIN GIARD JIAR LUC GIRARD JIRAR PASCAL PASKAL GOLDBERG GOLDBER ELEONORE ELEONOR HUBER UB MARKUS MARKU IRIS IRI JOLY JOLI BENOIT BENOI LEMAY LEMAI SYLVAIN SILVIN MUSTURI TOMMI TOMI NYLSO NILSO OBOM OBON PISHIER PICHI RICCI RIKSI STEFANO SAMSON JACQUES JAK DIECK DIEK MARTIN TOM TRAHAN TRAN SEBASTIEN SEBASTIN TURGEON TURJON DAVID DAVI VAYRYNEN VAIRINAN MIKKO MIKO VIAU VIO MICHEL WARD OIR BARNABY BARNABI WIGGERT OUIJER GREGOR ZVIANE ZVIAN',
$this->notice_integration->noticeToDBEnreg($this->notice_data)['auteurs']);
}
/** @test */
public function titlesContainsBEAR() {
$this->assertEquals('BEARS BEAR BEER BE FORMULE FORMUL N00 1',
$this->notice_integration->noticeToDBEnreg($this->notice_data)['titres']);
}
/** @test */
public function titleShouldBeBears() {
$this->assertEquals('Bears + beer : formule n°1',
$this->notice_integration->get_subfield('200', 'a')[0]);
}
}
class NoticeIntegrationDimancheALaPiscineTest extends NoticeIntegrationTestCase {
protected $_profil_donnees =
['id_profil' => 111,