From cbf76364ffe211a0c507a98517046685254315ee Mon Sep 17 00:00:00 2001
From: llaffont <llaffont@git-test.afi-sa.fr>
Date: Wed, 7 Nov 2012 13:42:27 +0000
Subject: [PATCH] =?UTF-8?q?Correction=20tests=20bo=C3=AEte=20newsletters?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../ProfilOptionsControllerTest.php            | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php b/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php
index 2fcaa77e9c2..e8654daf8de 100644
--- a/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php
+++ b/tests/application/modules/opac/controllers/ProfilOptionsControllerTest.php
@@ -272,20 +272,18 @@ abstract class ProfilOptionsControllerProfilJeunesseWithPagesJeuxMusiqueTestCase
 
 																					 '4' => ['division' => '1',
 																									 'type_module' => 'NEWS'],
+
 																					 '8' => ['division' => '2',
 																									 'type_module' => 'RESERVATIONS',
 																									 'preferences' => ['titre' => 'Mes réservations']],
 
 																					 '9' => ['division' => '2',
 																									 'type_module' => 'PRETS',
-																									 'preferences' => ['titre' => 'Mes documents'],
+																									 'preferences' => ['titre' => 'Mes documents']],
 
 																					 '10' => ['division' => '2',
 																									 'type_module' => 'NEWSLETTERS',
-																									 'preferences' => ['titre' => 'Lettres d\'informations']],
-
-
-																					 ]
+																									 'preferences' => ['titre' => 'Lettres d\'informations']]
 		                         ],
 														 'options' => 	[]];
 
@@ -404,8 +402,7 @@ class ProfilOptionsControllerProfilJeunesseViewPageJeuxTest extends ProfilOption
 
 class ProfilOptionsControllerViewProfilJeunesseAccueilTest extends ProfilOptionsControllerProfilJeunesseWithPagesJeuxMusiqueTestCase {
 	protected function _loginHook($account) {}
-
-
+	
 	public function setUp() {
 		parent::setUp();
 
@@ -418,7 +415,12 @@ class ProfilOptionsControllerViewProfilJeunesseAccueilTest extends ProfilOptions
 																->whenCalled('fileExists')
 																->answers(true));
 
-		$this->dispatch('/opac/');
+		Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Newsletter')
+			->whenCalled('count')->answers(5)
+			->whenCalled('findAll')->answers([Class_Newsletter::newInstanceWithId(23, ['titre' => 'Nouveautés'])]);
+
+
+		$this->dispatch('/opac/', true);
 	}
 
 
-- 
GitLab