diff --git a/library/ZendAfi/View/Helper/Accueil/BibNumerique.php b/library/ZendAfi/View/Helper/Accueil/BibNumerique.php index 0f138621c24eae6b81899bdbbc86298ce9227b0f..3698e83803ec424e4787430d3f57b2db813d18e7 100644 --- a/library/ZendAfi/View/Helper/Accueil/BibNumerique.php +++ b/library/ZendAfi/View/Helper/Accueil/BibNumerique.php @@ -33,7 +33,6 @@ class ZendAfi_View_Helper_Accueil_BibNumerique extends ZendAfi_View_Helper_Accue if ($album->getImages()) return false; $html=$this->view->renderAlbum($album); - $html .= $this->view->recordAlbums($album->getNotice()); return $html; } diff --git a/tests/library/ZendAfi/View/Helper/Accueil/BibNumeriqueTest.php b/tests/library/ZendAfi/View/Helper/Accueil/BibNumeriqueTest.php index 789d3cbed72a167d083a3e20bfde1707e6055b8c..a3fda703ad0da16390668047f5218fc890cb1977 100644 --- a/tests/library/ZendAfi/View/Helper/Accueil/BibNumeriqueTest.php +++ b/tests/library/ZendAfi/View/Helper/Accueil/BibNumeriqueTest.php @@ -611,6 +611,47 @@ class BibNumeriqueAlbumHarlockAsListeTest extends AbstractBibNumeriqueViewHelper + +class BibNumeriqueAlbumWithMp3RessourcesTest extends BibNumeriqueViewCollectionTestCase { + protected $html; + public function setUp() { + parent::setUp(); + + $album = Class_Album::find(1); + $album->setTypeDocId(Class_TypeDoc::AUDIO_RECORD)->save(); + + $ressource1 = $this->fixture('Class_AlbumRessource', ['id' => 1, + 'titre' => 'Cartes', + 'fichier' => 'cartes.mp3']); + + $preferences = array('boite' => '', + 'titre' => 'Harlock', + 'id_categories' => '', + 'id_albums' => '1', + 'nb_aff' => 2, + 'op_largeur_img' => 150, + 'op_hauteur_img' => 150, + 'type_aff' => Class_Systeme_ModulesAccueil_BibliothequeNumerique::DISPLAY_ALBUM_TEASER, + 'style_liste' => 'none'); + + $album->setRessource([$ressource1->setAlbum($album)]); + $helper = new ZendAfi_View_Helper_Accueil_BibNumerique(12, ['division' => 1, + 'type_module' => 'BIB_NUMERIQUE', + 'preferences' => $preferences]); + + $helper->setView(new ZendAfi_Controller_Action_Helper_View()); + $this->html = $helper->getBoite(); + } + + + /** @test */ + public function audioPlayerShouldBeDisplayeOnBibNumericBox() { + $this->assertXpath($this->html, '//audio[@preload="preload"]', $this->html); + } +} + + + class BibNumeriqueFixture { /** @return array */ public static function createOneCategorieTreePreference() {