From 41aeca8a41198d8594b60d440b657fbdda897a84 Mon Sep 17 00:00:00 2001
From: llaffont <laurent.laffont@gmail.com>
Date: Tue, 4 Mar 2014 16:05:38 +0100
Subject: [PATCH] Album audio record Rss feed: take the deduced title from
 filename

---
 library/ZendAfi/View/Helper/Album/RssFeedVisitor.php       | 2 +-
 .../opac/controllers/BibNumeriqueControllerTest.php        | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/library/ZendAfi/View/Helper/Album/RssFeedVisitor.php b/library/ZendAfi/View/Helper/Album/RssFeedVisitor.php
index 27dc64870fe..ac4aca6cf52 100644
--- a/library/ZendAfi/View/Helper/Album/RssFeedVisitor.php
+++ b/library/ZendAfi/View/Helper/Album/RssFeedVisitor.php
@@ -72,7 +72,7 @@ class ZendAfi_View_Helper_Album_RssFeedVisitor extends  Zend_View_Helper_Abstrac
 		$media_url = $this->view->album_PlayRessourceUrl($ressource);
 
 		$this->appendTags($item = $this->appendTag($this->_channel, 'item'),
-											['title' => $ressource->getTitre(),
+											['title' => $ressource->findTitle(),
 											 'link' => $media_url,
 											 'itunes:order' => $ressource->getOrdre(),
 											 'guid' => $media_url]);
diff --git a/tests/application/modules/opac/controllers/BibNumeriqueControllerTest.php b/tests/application/modules/opac/controllers/BibNumeriqueControllerTest.php
index 5d08b252b9d..920efbb55f2 100644
--- a/tests/application/modules/opac/controllers/BibNumeriqueControllerTest.php
+++ b/tests/application/modules/opac/controllers/BibNumeriqueControllerTest.php
@@ -869,6 +869,13 @@ class BibNumeriqueControllerAlbumMultiMediasRSSTest extends BibNumeriqueControll
 																							'2');
 	}
 
+
+	/** @test */
+	public function seventhItemTitleShouldBeTheProphecy() {
+		$this->_xpath->assertXPathContentContains($this->_response->getBody(),
+																							'//channel/item[7]/title',
+																							'The prophecy');
+	}
 }
 
 
-- 
GitLab