From d590482c9dce11016f0f0947b0dfeb6cdadf5bc4 Mon Sep 17 00:00:00 2001
From: gloas <gloas@afi-sa.fr>
Date: Wed, 31 Oct 2018 11:13:32 +0100
Subject: [PATCH] dev #78660 fix failures

---
 .../admin/controllers/AlbumControllerListViewModeTest.php | 8 ++++----
 tests/library/Class/MoteurRechercheTest.php               | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/application/modules/admin/controllers/AlbumControllerListViewModeTest.php b/tests/application/modules/admin/controllers/AlbumControllerListViewModeTest.php
index 984b1fce67d..cfebaae572a 100644
--- a/tests/application/modules/admin/controllers/AlbumControllerListViewModeTest.php
+++ b/tests/application/modules/admin/controllers/AlbumControllerListViewModeTest.php
@@ -166,13 +166,13 @@ class Admin_AlbumControllerListViewModeSearchTest extends Admin_AlbumControllerL
 
     $this->onLoaderOfModel('Class_Album')
          ->whenCalled('findAllBy')
-         ->with(['where' => '(titre like \'%Second%\')',
+         ->with(['where' => '(titre like \'%Second%\') or (type_doc_id like \'%Second%\')',
                  'order' => 'titre',
                  'limitPage' => [0, 25]])
          ->answers([Class_Album::find(2)])
 
          ->whenCalled('countBy')
-         ->with(['where' => '(titre like \'%Second%\')',
+         ->with(['where' => '(titre like \'%Second%\') or (type_doc_id like \'%Second%\')',
                  'order' => 'titre'])
          ->answers(200)
 
@@ -333,13 +333,13 @@ class Admin_AlbumControllerListViewModeSearchSpecialCharTest extends Admin_Album
 
     Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Album')
       ->whenCalled('findAllBy')
-      ->with(['where' => '(titre like \'%é%\')',
+      ->with(['where' => '(titre like \'%é%\') or (type_doc_id like \'%é%\')',
               'order' => 'titre',
               'limitPage' => [0, 25]])
       ->answers([Class_Album::find(2)])
 
       ->whenCalled('countBy')
-      ->with(['where' => '(titre like \'%é%\')',
+      ->with(['where' => '(titre like \'%é%\') or (type_doc_id like \'%é%\')',
               'order' => 'titre'])
       ->answers(200)
 
diff --git a/tests/library/Class/MoteurRechercheTest.php b/tests/library/Class/MoteurRechercheTest.php
index f3cad434f4e..5067b0bfd40 100644
--- a/tests/library/Class/MoteurRechercheTest.php
+++ b/tests/library/Class/MoteurRechercheTest.php
@@ -306,13 +306,13 @@ class MoteurRechercheSimpleTest extends MoteurRechercheTestCase {
             [['expressionRecherche' => '',
               'digital_lib' => '1'],
              'nb_mots'=> 0,
-             'req_liste' => "select id_notice, facettes from notices Where (type_doc in ('100','101','102','103','104','105','106','109','110','111','112','113','115','116','117','119','Assimil','Cvs','DiMusic','EntrepotNumeriqueMelun','LaSourisQuiRaconte','Lekiosk','LesYeuxDoc','Musicme','Omeka','Skilleos','StoryPlayR','ToutApprendre'))"],
+             'req_liste' => "select id_notice, facettes from notices Where (type_doc in ('100','101','102','103','104','105','106','109','110','111','112','113','115','116','117','119','Assimil','Cvs','DiMusic','LaSourisQuiRaconte','Lekiosk','LesYeuxDoc','Musicme','Numel','Omeka','Skilleos','StoryPlayR','ToutApprendre'))"],
 
 
             [['expressionRecherche' => 'logo',
               'digital_lib' => '1'],
              'nb_mots'=> 1,
-             'req_liste' => "select id_notice, facettes from notices Where " . $match_axes . " AGAINST('+(LOGO LOGOS LOGO)' IN BOOLEAN MODE) and (type_doc in ('100','101','102','103','104','105','106','109','110','111','112','113','115','116','117','119','Assimil','Cvs','DiMusic','EntrepotNumeriqueMelun','LaSourisQuiRaconte','Lekiosk','LesYeuxDoc','Musicme','Omeka','Skilleos','StoryPlayR','ToutApprendre')) order by (MATCH(titres) AGAINST(' LOGO') * 1.5) + (MATCH(auteurs) AGAINST(' LOGO')) desc"],
+             'req_liste' => "select id_notice, facettes from notices Where " . $match_axes . " AGAINST('+(LOGO LOGOS LOGO)' IN BOOLEAN MODE) and (type_doc in ('100','101','102','103','104','105','106','109','110','111','112','113','115','116','117','119','Assimil','Cvs','DiMusic','LaSourisQuiRaconte','Lekiosk','LesYeuxDoc','Musicme','Numel','Omeka','Skilleos','StoryPlayR','ToutApprendre')) order by (MATCH(titres) AGAINST(' LOGO') * 1.5) + (MATCH(auteurs) AGAINST(' LOGO')) desc"],
 
             [['expressionRecherche' => '',
               'id_panier' => 4],
-- 
GitLab