From c393654f3dbfe2240509d8f8ef5f7e8b479be6c3 Mon Sep 17 00:00:00 2001
From: efalcy <efalcy@git-test.afi-sa.fr>
Date: Thu, 12 Dec 2013 17:32:48 +0000
Subject: [PATCH] add test

---
 .../opac/controllers/CmsControllerTest.php    | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/tests/application/modules/opac/controllers/CmsControllerTest.php b/tests/application/modules/opac/controllers/CmsControllerTest.php
index 46671b4de60..9ca215f4564 100644
--- a/tests/application/modules/opac/controllers/CmsControllerTest.php
+++ b/tests/application/modules/opac/controllers/CmsControllerTest.php
@@ -361,8 +361,9 @@ class CmsControllerProfilDivisionTest extends AbstractCmsControllerArticleViewBy
 																									 'preferences' => ['titre' => 'Lettres d\'informations']],
 
 																					 '11' => ['division' => '1',
-																									 'type_module' => 'MULTIMEDIA',
-																										'preferences' => ['titre' => 'Postes multimédia']],
+																									 'type_module' => 'LOGIN',
+																									 'preferences' => ['lien_connexion' => 'Par ici la connexion']],
+																					 
 				]];
 		Class_Profil::getCurrentProfil()->setCfgAccueil($cfg_accueil_jeunesse);
 		$this->dispatch('/cms/articleviewbydate?d=2011-09-03&id_module=8&id_profil=2&select_id_categorie=all', true);
@@ -375,6 +376,12 @@ class CmsControllerProfilDivisionTest extends AbstractCmsControllerArticleViewBy
 
 	}
 
+	/** @test */
+	public function boiteLoginShouldBeDisplayedAtLeft() {
+		$this->assertXPath("//div[contains(@class, 'colGauche')]//div[@id='boite_login']",$this->_response->getBody());
+
+	}
+
 
 	public function selectedDivisionThreeAlwaysVisible() {
 		$cfg_site=Class_Profil::getCurrentProfil()-> getCfgSiteAsArray();
@@ -389,6 +396,14 @@ class CmsControllerProfilDivisionTest extends AbstractCmsControllerArticleViewBy
 		$this->assertXPath("//div[contains(@class, 'colDroite')]//div[@class='boite_newsletters']",$this->_response->getBody());
 	}
 
+	/** @test */
+	public function boiteLoginShouldBeDisplayedAtRightWhenReverseOrder() {
+		Class_Profil::getCurrentProfil()->setOrdreDivisions(1);
+		$this->dispatch('/cms/articleviewbydate?d=2011-09-03&id_module=8&id_profil=2&select_id_categorie=all', true);
+		$this->assertXPath("//div[contains(@class, 'colDroite')]//div[@id='boite_login']",$this->_response->getBody());
+
+	}
+
 
 	/** @test */
 	public function boiteNewsletterShouldNotBeDisplayedWhenReverseOrder() {
-- 
GitLab