From 4f424636a2f7cf94483670e60320725a4b87c8fe Mon Sep 17 00:00:00 2001
From: Ghislain Loas <ghislo@sandbox.pergame.net>
Date: Thu, 21 Jan 2016 15:38:36 +0100
Subject: [PATCH] hotline #35768 fix rt comments

---
 library/ZendAfi/View/Helper/ComboProfils.php                  | 4 +---
 .../modules/opac/controllers/IndexControllerTest.php          | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/library/ZendAfi/View/Helper/ComboProfils.php b/library/ZendAfi/View/Helper/ComboProfils.php
index be72be97769..9c0799b772c 100644
--- a/library/ZendAfi/View/Helper/ComboProfils.php
+++ b/library/ZendAfi/View/Helper/ComboProfils.php
@@ -89,9 +89,7 @@ class ZendAfi_View_Helper_ComboProfils extends ZendAfi_View_Helper_BaseHelper {
 
 
   protected function getProfilUrl() {
-    return  rtrim(Class_Url::absolute(['module' => 'opac',
-                                       'controller' => 'index',
-                                       'action' => 'index'], null, true), '/') . '/?id_profil=';
+    return  rtrim($this->view->url(['id_profil' => null], null, true), '/') . '/?id_profil=';
   }
 
 
diff --git a/tests/application/modules/opac/controllers/IndexControllerTest.php b/tests/application/modules/opac/controllers/IndexControllerTest.php
index c1a1e2ec5cf..625762d9b68 100644
--- a/tests/application/modules/opac/controllers/IndexControllerTest.php
+++ b/tests/application/modules/opac/controllers/IndexControllerTest.php
@@ -124,9 +124,7 @@ class IndexControllerAsAdminWithCssEditorAndNoHeaderCss extends IndexControllerA
 
   /** @test */
   public function comboProfilOnChangeShouldContainsBaseUrl() {
-    $this->assertXPath('//div[@class="footer"]//select[@id="select_clef_profil"][contains(@onchange, "' . Class_Url::absolute(['module' => 'opac',
-                                                                                                                               'controller' => 'index',
-                                                                                                                               'action' => 'index']) . '?id_profil=")]', $this->_response->getBody());
+    $this->assertXPath('//div[@class="footer"]//select[@id="select_clef_profil"][@onchange="window.location=\'/?id_profil=\' + this.value"]');
   }
 
 
-- 
GitLab