From 196f9e04f321efab4695cd31eba39be6815cbcd0 Mon Sep 17 00:00:00 2001
From: llaffont <llaffont@afi-sa.fr>
Date: Fri, 24 Jul 2015 11:57:04 +0200
Subject: [PATCH] dev #22209 search result feed

test fix
---
 library/ZendAfi/View/Helper/ListeNotices/Chrono.php           | 4 +---
 .../modules/opac/controllers/RechercheControllerJsonTest.php  | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/library/ZendAfi/View/Helper/ListeNotices/Chrono.php b/library/ZendAfi/View/Helper/ListeNotices/Chrono.php
index e8c8091570c..38e60bb3350 100644
--- a/library/ZendAfi/View/Helper/ListeNotices/Chrono.php
+++ b/library/ZendAfi/View/Helper/ListeNotices/Chrono.php
@@ -34,8 +34,6 @@ class ZendAfi_View_Helper_ListeNotices_Chrono extends ZendAfi_View_Helper_ListeN
     static::$_id_counter =  static::$_id_counter + 1;
     $embed_id = 'liste_chrono_'.static::$_id_counter;
 
-    $resultat = new Class_MoteurRecherche_Resultat($data);
-
     $storyjs_params = [
       'type' => 'timeline',
       'embed_id' => $embed_id,
@@ -43,7 +41,7 @@ class ZendAfi_View_Helper_ListeNotices_Chrono extends ZendAfi_View_Helper_ListeN
       'height' => (isset($preferences['op_hauteur']) ? $preferences['op_hauteur'] : 600),
       'start_at_end' => true,
       'start_zoom_adjust' => -4,
-      'source' => json_decode($this->view->listeNotices_ChronoSource($resultat, $preferences)),
+      'source' => json_decode($this->view->listeNotices_ChronoSource($data, $preferences)),
       'js' => BASE_URL.'/public/opac/TimelineJS-2.25/compiled/js/timeline.js',
       'css' => BASE_URL.'/public/opac/TimelineJS-2.25/compiled/css/timeline.css',
       'lang' => 'fr',
diff --git a/tests/application/modules/opac/controllers/RechercheControllerJsonTest.php b/tests/application/modules/opac/controllers/RechercheControllerJsonTest.php
index ff68f2dd76c..2bac6827cd2 100644
--- a/tests/application/modules/opac/controllers/RechercheControllerJsonTest.php
+++ b/tests/application/modules/opac/controllers/RechercheControllerJsonTest.php
@@ -135,7 +135,7 @@ class RechercheControllerJsonWithResultTest extends RechercheControllerJsonTestC
 
 
     $loader->whenCalled('findAllByRequeteRecherche')
-           ->with('Select id_notice from notices', 5, 1)
+           ->with('Select id_notice from notices', 5, null)
            ->answers([$potter, $rdv])
            ->beStrict();
   }
-- 
GitLab