From 379755d4f1dbf722c3875bcb48a145731eaf801e Mon Sep 17 00:00:00 2001 From: llaffont <llaffont@afi-sa.fr> Date: Mon, 27 Jul 2015 17:00:21 +0200 Subject: [PATCH] dev #22209 search result feed test fix --- .../controllers/RechercheControllerTest.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/application/modules/opac/controllers/RechercheControllerTest.php b/tests/application/modules/opac/controllers/RechercheControllerTest.php index a744ee1d97c..ff5573f6045 100644 --- a/tests/application/modules/opac/controllers/RechercheControllerTest.php +++ b/tests/application/modules/opac/controllers/RechercheControllerTest.php @@ -1695,12 +1695,13 @@ abstract class RechercheControllerSearchResultGuideeFixtures extends AbstractCon $this->mock_moteur_recherche ->whenCalled('lancerRecherche') - - ->answers((new Class_MoteurRecherche_Result($this->mock_moteur_recherche, - new Class_CriteresRecherche())) - ->setRecordsQuery('select') - ->setRecordsCount(10) - ->setFacetsQuery('select')); + ->willDo( + function($criteres) { + return (new Class_MoteurRecherche_Result($this->mock_moteur_recherche, $criteres)) + ->setRecordsQuery('select') + ->setRecordsCount(10) + ->setFacetsQuery('select'); + }); Class_Codification::setInstance($this->mock_codif); Class_MoteurRecherche::setInstance($this->mock_moteur_recherche); @@ -1810,8 +1811,10 @@ class RechercheControllerSimpleActionWithCatalogueAndDomainBrowserWidgetTest ext $mock_moteur_recherche = Storm_Test_ObjectWrapper::mock(); $mock_moteur_recherche ->whenCalled('lancerRecherche') - ->answers(new Class_MoteurRecherche_Result($mock_moteur_recherche, - new Class_CriteresRecherche())) + ->willDo( + function($criteres) use ($mock_moteur_recherche){ + return (new Class_MoteurRecherche_Result($mock_moteur_recherche, $criteres)); + }) ->whenCalled('getFacettes') ->answers(['facettes' => [], 'tags' => []]); -- GitLab