From 1ac73bc57fd61619e5a4726b81fb11edc5b87f31 Mon Sep 17 00:00:00 2001
From: llaffont <llaffont@afi-sa.fr>
Date: Sat, 14 Nov 2015 09:55:51 +0100
Subject: [PATCH] test fix

---
 .../telephone/views/scripts/recherche/simple.phtml        | 3 +--
 .../modules/opac/controllers/RechercheControllerTest.php  | 6 +++++-
 .../telephone/controllers/RechercheControllerTest.php     | 8 +++++++-
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/application/modules/telephone/views/scripts/recherche/simple.phtml b/application/modules/telephone/views/scripts/recherche/simple.phtml
index 770cf4eea74..3a82ab81088 100644
--- a/application/modules/telephone/views/scripts/recherche/simple.phtml
+++ b/application/modules/telephone/views/scripts/recherche/simple.phtml
@@ -1,8 +1,7 @@
 <ul data-role="listview">
 <?php
 echo $this->toolbar("Recherche", $this->url(array(), null, true));
-echo $this->tagTitreEtNombreDeResultats($this->search_result->getRecordsCount(),
-                                        $this->criteres_recherche);
+echo $this->tagTitreEtNombreDeResultats($this->search_result, $this->search_duration);
 
 
 echo $this->listeNotices($this->search_result->fetchRecords(),
diff --git a/tests/application/modules/opac/controllers/RechercheControllerTest.php b/tests/application/modules/opac/controllers/RechercheControllerTest.php
index 4f400ae547a..ccddbd6831f 100644
--- a/tests/application/modules/opac/controllers/RechercheControllerTest.php
+++ b/tests/application/modules/opac/controllers/RechercheControllerTest.php
@@ -1107,10 +1107,14 @@ class RechercheControllerSimpleActionWithDefaultConfigTest extends RechercheCont
     Class_Profil::getCurrentProfil()->setCfgModules([]);
 
     $this->dispatch('/recherche/simple/expressionRecherche/pomme/tri/alpha_auteur',true);
-
   }
 
 
+  /** @test */
+  public function pageShouldContainsSearchDurationInSecondes() {
+    $this->assertXPathContentContains('//div', 'secondes)');
+  }
+
 
   /** @test */
   public function pageShouldContainsLinkToAtomFormat() {
diff --git a/tests/application/modules/telephone/controllers/RechercheControllerTest.php b/tests/application/modules/telephone/controllers/RechercheControllerTest.php
index 2eec4626e49..dc0e00c1b59 100644
--- a/tests/application/modules/telephone/controllers/RechercheControllerTest.php
+++ b/tests/application/modules/telephone/controllers/RechercheControllerTest.php
@@ -25,7 +25,7 @@ require_once 'TelephoneAbstractControllerTestCase.php';
 class Telephone_RechercheControllerSimpleSeveralInexistingWordsActionTest extends TelephoneAbstractControllerTestCase {
   public function setUp() {
     parent::setUp();
-    $this->dispatch('/telephone/recherche/simple/expressionRecherche/zzriuezz+greuieub+brfauiok');
+    $this->dispatch('/telephone/recherche/simple/expressionRecherche/zzriuezz+greuieub+brfauiok', true);
 
   }
 
@@ -99,6 +99,12 @@ class Telephone_RechercheControllerSimpleByPertinenceActionTest extends Telephon
   public function pageShouldNotDisplayAucunResultat() {
     $this->assertNotXPathContentContains('//span', 'Aucun résultat trouvé');
   }
+
+
+  /** @test */
+  public function pageShouldContainsSearchDurationInSecondes() {
+    $this->assertXPathContentContains('//div', 'secondes)');
+  }
 }
 
 
-- 
GitLab