From 0ca5b8527d2f9b58ec524437275135b91cfc17c8 Mon Sep 17 00:00:00 2001
From: llaffont <llaffont@git-test.afi-sa.fr>
Date: Fri, 5 Apr 2013 10:10:44 +0000
Subject: [PATCH] Correction tests catalogue

---
 library/Class/CriteresRecherche.php                    | 6 ++----
 tests/library/Class/CatalogueTest.php                  | 3 ++-
 tests/library/ZendAfi/View/Helper/Accueil/TagsTest.php | 1 +
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/library/Class/CriteresRecherche.php b/library/Class/CriteresRecherche.php
index 07a151352f3..283e37be9e9 100644
--- a/library/Class/CriteresRecherche.php
+++ b/library/Class/CriteresRecherche.php
@@ -210,16 +210,16 @@ class Class_CriteresRecherche {
 
 
 	public function getPanier()  {
-	
 		$id_panier=$this->getParam('id_panier','');
 		if ($id_user=$this->getParam('id_user'))
 			return Class_PanierNotice::getLoader()->findFirstBy(array('id_user' => $id_user,
-																																	 'id_panier' => $id_panier));
+																																'id_panier' => $id_panier));
 		if ($id_panier)
 			return Class_PanierNotice::find($id_panier);
 		return null;
 	}
 
+
 	public function visitCatalogue($visitor, $catalogue) {
 		$this->setParams($catalogue->buildCriteresRecherche($this->getCriteres()));
 		if ($catalogue->getCoteDebut()||$catalogue->getCoteFin())
@@ -228,8 +228,6 @@ class Class_CriteresRecherche {
 			$visitor->visitNouveaute(0);
 		if ($catalogue->getAnneeDebut() || $catalogue->getAnneeFin())
 			$visitor->visitAnneeDebutFin($catalogue->getAnneeDebut(),$catalogue->getAnneeFin());
-
-		
 	}
 
 
diff --git a/tests/library/Class/CatalogueTest.php b/tests/library/Class/CatalogueTest.php
index d2920f91f85..a2880861e08 100644
--- a/tests/library/Class/CatalogueTest.php
+++ b/tests/library/Class/CatalogueTest.php
@@ -417,12 +417,13 @@ class CatalogueTestGetNoticesByPreferences extends ModelTestCase {
 
 		$this->mock_sql
 			->whenCalled('fetchAll')
-			->with("select notices.id_notice, notices.editeur, notices.annee, notices.date_creation, notices.facettes, notices.clef_oeuvre from notices  order by alpha_titre  LIMIT 0,25",
+			->with("select notices.id_notice, notices.editeur, notices.annee, notices.date_creation, notices.date_maj, notices.facettes, notices.clef_oeuvre from notices  order by alpha_titre  LIMIT 0,25",
 						 false)
 			->answers(array(array('id_notice' => 23,
 														'editeur' => 'dargaud',
 														'annee' => 1975,
 														'date_creation' => '2011-02-23',
+														'date_maj' => '2011-02-25',
 														'facettes' => '',
 														'clef_oeuvre' => 'JEUNE FILLE')))
 			->beStrict();
diff --git a/tests/library/ZendAfi/View/Helper/Accueil/TagsTest.php b/tests/library/ZendAfi/View/Helper/Accueil/TagsTest.php
index 80202637df3..7c805a44826 100644
--- a/tests/library/ZendAfi/View/Helper/Accueil/TagsTest.php
+++ b/tests/library/ZendAfi/View/Helper/Accueil/TagsTest.php
@@ -33,6 +33,7 @@ class TagsTest extends ViewHelperTestCase {
 													'editeur' => '',
 													'annee' => '',
 													'date_creation' => '',
+													'date_maj' => '',
 													'clef_oeuvre' => '');
 
 		Class_Notice::newInstanceWithId(34, $notice_enreg);
-- 
GitLab