diff --git a/library/ZendAfi/View/Helper/Album/PlayRessourceUrl.php b/library/ZendAfi/View/Helper/Album/PlayRessourceUrl.php index ce9a0735f4fd3c08c26a014de4fb0642f334050e..680bdd4a0592b56eee29fcabf82d9512df6e2103 100644 --- a/library/ZendAfi/View/Helper/Album/PlayRessourceUrl.php +++ b/library/ZendAfi/View/Helper/Album/PlayRessourceUrl.php @@ -25,7 +25,7 @@ class ZendAfi_View_Helper_Album_PlayRessourceUrl extends Zend_View_Helper_Abstr if (!$extension && $ressource->hasUrl()) return $this->view->absoluteUrl($ressource->getOriginalUrl()); - return $this->view->absoluteUrl('bib-numerique/play-ressource/id/'.$ressource->getId(),null,true).'.'.$extension; + return $this->view->absoluteUrl('/bib-numerique/play-ressource/id/'.$ressource->getId(),null,true).'.'.$extension; } } diff --git a/tests/application/modules/opac/controllers/RechercheControllerAlbumAudioRecordTest.php b/tests/application/modules/opac/controllers/RechercheControllerAlbumAudioRecordTest.php index 51e9f67118e7d32d0bec4b44d266d0f5ff5aab29..cee33ca145cd2c891b7c144a257bbfbe987c7667 100644 --- a/tests/application/modules/opac/controllers/RechercheControllerAlbumAudioRecordTest.php +++ b/tests/application/modules/opac/controllers/RechercheControllerAlbumAudioRecordTest.php @@ -116,7 +116,7 @@ class RechercheControllerAlbumAudioRecordViewNoticeTest extends RechercheControl /** @test */ public function noticeFirstMorceauUrlEcouteShouldBeMoonchildDotMP3() { - $this->assertContains('bib-numerique/play-ressource/id/1.mp3', + $this->assertContains('/bib-numerique/play-ressource/id/1.mp3', $this->_notice->getMorceaux()['morceaux'][1][1]['url_ecoute']); } @@ -147,7 +147,7 @@ class RechercheControllerAlbumAudioRecordViewMorceauxTest extends RechercheContr /** @test */ public function moonchildPlayerShouldBePresent() { - $this->assertXPath('//audio/source[contains(@src, "bib-numerique/play-ressource/id/1.mp3")]', $this->_response->getBody()); + $this->assertXPath('//audio/source[contains(@src, "/bib-numerique/play-ressource/id/1.mp3")]', $this->_response->getBody()); } @@ -210,7 +210,7 @@ class RechercheControllerAlbumAudioRecordViewRessourcesNumeriquesTest extends Re /** @test */ public function moonchildPlayerShouldBePresent() { - $this->assertXPath('//ol//li//audio/source[contains(@src, "bib-numerique/play-ressource/id/1.mp3")]', $this->_response->getBody()); + $this->assertXPath('//ol//li//audio/source[contains(@src, "/bib-numerique/play-ressource/id/1.mp3")]', $this->_response->getBody()); } @@ -265,7 +265,7 @@ class RechercheControllerAlbumAudioRecordAsTelephoneViewRessourcesNumeriquesTest /** @test */ public function moonchildPlayerShouldBePresent() { - $this->assertXPath('//ol//li//audio/source[contains(@src, "bib-numerique/play-ressource/id/1.mp3")]', $this->_response->getBody()); + $this->assertXPath('//ol//li//audio/source[contains(@src, "/bib-numerique/play-ressource/id/1.mp3")]', $this->_response->getBody()); }