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

rel #24999 : fix test failure

parent cd3eb25a
Branches
Tags
3 merge requests!1132Hotline#29412 images des articles dans le resultat de recherche,!1120Master,!1108Hotline#24999 gestion des isbn a l import cosmogramme
......@@ -38,6 +38,18 @@ class NoticeUnimarcThesaurusFieldTest extends ModelTestCase {
/** @see http://forge.afi-sa.fr/issues/24999 */
class NoticeUnimarcMultipleIsbnTest extends ModelTestCase {
public function setUp() {
parent::setUp();
Storm_Model_Loader::defaultToVolatile();
}
public function tearDown() {
Storm_Model_Loader::defaultToDb();
parent::tearDown();
}
/** @test */
public function withTwoIsbnsShouldKeepIsbn13() {
$type_doc = [['code' => '0', 'label' => '', 'zone_995' => '' ],
......@@ -84,15 +96,20 @@ class NoticeUnimarcMultipleIsbnTest extends ModelTestCase {
]
]);
$this->fixture('Class_CodifTypeDoc',
$codif_type_doc = $this->fixture('Class_CodifTypeDoc',
['id' => 31,
'label' => 'Romans gros caractères',
'famille_id' => Class_CodifTypeDoc::LIVRE]);
$this->fixture('Class_TypeDoc',
['id' => 31,
'label' => 'Romans gros caractères',
'famille_id' => Class_CodifTypeDoc::LIVRE]);
'codif_type_doc' => $codif_type_doc]);
$record = new notice_unimarc();
$record->ouvrirNotice(file_get_contents(__DIR__ . '/unimarc_multi_isbn.txt'), 408);
$record = $record->getNoticeIntegration();
$this->assertEquals('978-2-8401-1742-1', $record['isbn']);
$this->assertEquals('978-2-8401-1742-1', $record['isbn'], json_encode($record));
}
}
\ 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