From 832b8aea56a5a60fa2c4d19227abb86ef83968a8 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Mon, 14 Nov 2016 14:43:06 +0530 Subject: [PATCH] CRM-19048 - test fixes --- tests/phpunit/CRM/Utils/QueryFormatterTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/CRM/Utils/QueryFormatterTest.php b/tests/phpunit/CRM/Utils/QueryFormatterTest.php index fbd9cffd99..04ff5dc283 100644 --- a/tests/phpunit/CRM/Utils/QueryFormatterTest.php +++ b/tests/phpunit/CRM/Utils/QueryFormatterTest.php @@ -74,7 +74,7 @@ class CRM_Utils_QueryFormatterTest extends CiviUnitTestCase { $cases[] = array('someone@example.com', 'fts', 'wildwords', '*someone* *example*', $allEmailRows); $cases[] = array('someone@example.com', 'fts', 'wildwords-suffix', 'someone* example*', $allEmailRows); - $cases[] = array('someone@example.com', 'ftsbool', 'simple', '+someone +example', $allEmailRows); + $cases[] = array('someone@example.com', 'ftsbool', 'simple', '+"someone" +"example"', $allEmailRows); $cases[] = array('someone@example.com', 'ftsbool', 'phrase', '+"someone@example.com"', $allEmailRows); $cases[] = array('someone@example.com', 'ftsbool', 'wildphrase', '+"*someone@example.com*"', $allEmailRows); $cases[] = array('someone@example.com', 'ftsbool', 'wildwords', '+*someone* +*example*', $allEmailRows); @@ -92,7 +92,7 @@ class CRM_Utils_QueryFormatterTest extends CiviUnitTestCase { $cases[] = array('first second', 'fts', 'wildwords', '*first* *second*', array(3, 4, 5, 7)); $cases[] = array('first second', 'fts', 'wildwords-suffix', 'first* second*', array(3, 4, 5, 7)); - $cases[] = array('first second', 'ftsbool', 'simple', '+first +second', array(3, 4, 5)); + $cases[] = array('first second', 'ftsbool', 'simple', '+"first" +"second"', array(3, 4, 5)); $cases[] = array('first second', 'ftsbool', 'phrase', '+"first second"', array(3, 4, 5)); $cases[] = array('first second', 'ftsbool', 'wildphrase', '+"*first second*"', array(3, 4, 5)); $cases[] = array('first second', 'ftsbool', 'wildwords', '+*first* +*second*', array(3, 4, 5, 7)); @@ -104,6 +104,9 @@ class CRM_Utils_QueryFormatterTest extends CiviUnitTestCase { $cases[] = array('first second', 'solr', 'wildwords', '*first* *second*', NULL); $cases[] = array('first second', 'solr', 'wildwords-suffix', 'first* second*', NULL); + $cases[] = array('someone@', 'ftsbool', 'simple', '+"someone"', $allEmailRows); + $cases[] = array('@example.com', 'ftsbool', 'simple', '+"example.com"', $allEmailRows); + // If user supplies wildcards, then ignore mode. foreach (array( 'simple', -- 2.25.1