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

rel #24999 : fix test failure

parent 105c99df
3 merge requests!1132Hotline#29412 images des articles dans le resultat de recherche,!1120Master,!1108Hotline#24999 gestion des isbn a l import cosmogramme
......@@ -38,8 +38,17 @@ class NoticeUnimarcThesaurusFieldTest extends ModelTestCase {
/** @see http://forge.afi-sa.fr/issues/24999 */
class NoticeUnimarcMultipleIsbnTest extends ModelTestCase {
/** @test */
public function withTwoIsbnsShouldKeepIsbn13() {
protected $_record;
public function setUp() {
parent::setUp();
Storm_Model_Loader::defaultToVolatile();
$this->fixture('Class_CosmoVar',
['id' => 'types_docs',
'liste' => "0:non identifié\r\n1:livres\r\n2:périodiques\r\n3:disques\r\n4:DVD\r\n5:cédéroms\r\n8:articles cms\r\n9:fils rss\r\n10:sites internet\r\n100:Livre Numérique\r\n101:Diaporamas\r\n102:Type doc\r\n103:OAI\r\n104:Type doc\r\n105:Formation Vodéclic\r\n106:Livres Numériques\r\n107:Vidéos à la demande\r\n108:Tout apprendre\r\n109:Enregistrement audio\r\n110:Numérique Premium"]);
$type_doc = [['code' => '0', 'label' => '', 'zone_995' => '' ],
['code' => '1', 'label' => 'am;na', 'zone_995' => 'LIVR' ],
['code' => '2', 'label' => 'as', 'zone_995' => 'PERI'],
......@@ -81,8 +90,7 @@ class NoticeUnimarcMultipleIsbnTest extends ModelTestCase {
'format' => Class_IntProfilDonnees::NOVELTY_DATE_FORMAT_VALUES,
'jours' => '15',
'valeurs' => '1']
]
]);
]]);
$codif_type_doc = $this->fixture('Class_CodifTypeDoc',
['id' => 31,
......@@ -96,8 +104,18 @@ class NoticeUnimarcMultipleIsbnTest extends ModelTestCase {
$record = new notice_unimarc();
$record->ouvrirNotice(file_get_contents(__DIR__ . '/unimarc_multi_isbn.txt'), 408);
$record = $record->getNoticeIntegration();
$this->_record = $record->getNoticeIntegration();
}
$this->assertEquals('978-2-8401-1742-1', $record['isbn'], json_encode($record));
public function tearDown() {
Storm_Model_Loader::defaultToDb();
parent::tearDown();
}
/** @test */
public function withTwoIsbnsShouldKeepIsbn13() {
$this->assertEquals('978-2-8401-1742-1', $this->_record['isbn']);
}
}
\ 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