From 7650d525d5a7babc47889d5cca08569e5eca1071 Mon Sep 17 00:00:00 2001 From: Patrick Barroca <pbarroca@afi-sa.fr> Date: Thu, 8 Nov 2018 08:59:40 +0100 Subject: [PATCH] dev #72435 : fix failures --- .../modules/admin/controllers/CatalogueControllerTest.php | 2 +- tests/library/ZendAfi/View/Helper/Accueil/KiosqueTest.php | 6 +++--- tests/scenarios/bookmarks/SearchTest.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/application/modules/admin/controllers/CatalogueControllerTest.php b/tests/application/modules/admin/controllers/CatalogueControllerTest.php index 49a7d8076e0..4cd4b102993 100644 --- a/tests/application/modules/admin/controllers/CatalogueControllerTest.php +++ b/tests/application/modules/admin/controllers/CatalogueControllerTest.php @@ -607,7 +607,7 @@ class CatalogueControllerActionTesterTest extends AbstractControllerTestCase { /** @test */ public function pageShouldDisplayRequest() { - $this->assertContains("select * from notices Where MATCH(facettes) AGAINST(' +(B1) +( D78308*)' IN BOOLEAN MODE) and notices.type_doc IN ('1', '3', '4', '5') and annee >= '2012' and annee <= '2012' order by alpha_titre LIMIT 0,20", + $this->assertContains("select * from notices Where (MATCH(facettes) AGAINST(' +(B1) +( D78308*)' IN BOOLEAN MODE) and notices.type_doc IN ('1', '3', '4', '5') and annee >= '2012' and annee <= '2012') and type=1 order by alpha_titre LIMIT 0,20", $this->_response->getBody()); } diff --git a/tests/library/ZendAfi/View/Helper/Accueil/KiosqueTest.php b/tests/library/ZendAfi/View/Helper/Accueil/KiosqueTest.php index 27a7021350a..172fdfa3545 100644 --- a/tests/library/ZendAfi/View/Helper/Accueil/KiosqueTest.php +++ b/tests/library/ZendAfi/View/Helper/Accueil/KiosqueTest.php @@ -298,11 +298,11 @@ abstract class ZendAfi_View_Helper_Accueil_KiosqueRequetesTestCase extends ZendA $this->mock_sql ->whenCalled('fetchOne') - ->with("select count(*) from notices where notices.clef_alpha in('BB') and url_vignette > '' and url_vignette != 'NO' ") + ->with("select count(*) from notices where notices.clef_alpha in('BB') and url_vignette > '' and url_vignette != 'NO' and type=1 ") ->answers(10) ->whenCalled('fetchAllByColumn') - ->with("select notices.id_notice from notices where notices.clef_alpha in('BB') and url_vignette > '' and url_vignette != 'NO' order by date_creation DESC LIMIT 0,50") + ->with("select notices.id_notice from notices where notices.clef_alpha in('BB') and url_vignette > '' and url_vignette != 'NO' and type=1 order by date_creation DESC LIMIT 0,50") ->answers([2, 45]) ->beStrict(); @@ -637,7 +637,7 @@ class ZendAfi_View_Helper_Accueil_KiosqueWithLinkedRecordsInDomainSetTest extend /** @test */ public function requestShouldBeAsExpected() { - $this->assertEquals('select id_notice from notices Where MATCH(facettes) AGAINST(\'Q5\' IN BOOLEAN MODE) order by date_creation DESC LIMIT 0,50', $this->_request['req_liste']); + $this->assertEquals('select id_notice from notices Where MATCH(facettes) AGAINST(\'Q5\' IN BOOLEAN MODE) and type=1 order by date_creation DESC LIMIT 0,50', $this->_request['req_liste']); } } diff --git a/tests/scenarios/bookmarks/SearchTest.php b/tests/scenarios/bookmarks/SearchTest.php index d6edfb23cb0..f35445656f4 100644 --- a/tests/scenarios/bookmarks/SearchTest.php +++ b/tests/scenarios/bookmarks/SearchTest.php @@ -657,7 +657,7 @@ class Bookmarks_SearchDiffLoggedTest extends AbstractControllerTestCase { Zend_Registry::set('sql', $this->mock() ->whenCalled('fetchAll') - ->with("select id_notice, facettes from notices Where MATCH(titres, auteurs, editeur, collection, matieres, dewey) AGAINST('+(HARRY HARRYS ARI) +(POTTER POTTERS POT)' IN BOOLEAN MODE) and clef_alpha in ('DROITDEVANT--ODAEIICHIRO-15-GLENAT-2013-1') order by (MATCH(titres) AGAINST(' HARRY POTTER') * 1.5) + (MATCH(auteurs) AGAINST(' HARRY POTTER')) desc", true, false) + ->with("select id_notice, facettes from notices Where (MATCH(titres, auteurs, editeur, collection, matieres, dewey) AGAINST('+(HARRY HARRYS ARI) +(POTTER POTTERS POT)' IN BOOLEAN MODE) and clef_alpha in ('DROITDEVANT--ODAEIICHIRO-15-GLENAT-2013-1')) and type=1 order by (MATCH(titres) AGAINST(' HARRY POTTER') * 1.5) + (MATCH(auteurs) AGAINST(' HARRY POTTER')) desc", true, false) ->answers([[1888, '']]) ->beStrict()); -- GitLab