Skip to content
Snippets Groups Projects
Commit 9f5b19fd authored by Laurent's avatar Laurent
Browse files

hotline #41683 fix PNB ONIX record xml decoding

parent 76862c8d
Branches
Tags
2 merge requests!1659Master,!1624Hotline#41683 probleme pnb dole
......@@ -50,7 +50,7 @@ class Class_WebService_BibNumerique_Dilicom_PNBOffersFile {
public function endNotice($data) {
$this->_books []= Class_WebService_BibNumerique_Dilicom_ONIXFile::bookFromXML(html_entity_decode($data));
$this->_books []= Class_WebService_BibNumerique_Dilicom_ONIXFile::bookFromXML($data);
}
......
......@@ -95,7 +95,7 @@ class DilicomONIXParserTest extends Storm_Test_ModelTestCase {
/** @test */
public function albumRightShouldBeOther() {
$album = $this->_book->import();
$this->assertEquals(Class_Album::RIGHT_OTHER_KEY, $album->getDroits());
$this->assertEquals('Tous droits réservés', $album->getDroits());
}
......
......@@ -102,15 +102,6 @@ class DilicomPNBOfferParserTest extends DilicomPNBOfferParserTestCase {
}
/**
* @depends firstAlbumShouldBePlusJamaisSansElle
* @test
*/
public function firstAlbumRightsShouldBe($album) {
$this->assertEquals('Tous droits réservés',
$album->getDroits());
}
/**
* @depends firstAlbumShouldBePlusJamaisSansElle
* @test
......@@ -383,7 +374,7 @@ class DilicomDecitresPNBOffersParserTest extends DilicomPNBOfferParserTestCase {
/** @test */
public function firstAlbumShouldBeEspritRouge() {
public function firstBookShouldBeEspritRouge() {
$album = $this->_books[0]->import();
$this->assertEquals('L’Esprit rouge', $album->getTitre());
......@@ -392,14 +383,31 @@ class DilicomDecitresPNBOffersParserTest extends DilicomPNBOfferParserTestCase {
/**
* @depends firstAlbumShouldBeEspritRouge
* @depends firstBookShouldBeEspritRouge
* @test
*/
public function firstAlbumThumbnailShouldBeSmallDotJpg($album) {
public function firstBookThumbnailShouldBeSmallDotJpg($album) {
$this->assertEquals('https://assets.edenlivres.fr/assets/publications/171925/cover/small.jpg',
$album->getPoster());
}
/** @test */
public function secondBookShouldBeCompagnons() {
$album = $this->_books[1]->import();
$this->assertEquals('Compagnons', $album->getTitre());
return $album;
}
/**
* @depends secondBookShouldBeCompagnons
* @test
*/
public function secondBookDescriptionShouldContainsJeuneApprentie($album) {
$this->assertContains('Émilie, jeune apprentie au caractère entier',
$album->getDescription());
}
}
?>
\ 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