@@ -387,11 +387,15 @@ public function test_construct_wildcard() {
387387 $ proxy = $ method ->invoke (new \search_elastic \query , $ q ); // Get result of invoked method.
388388 $ this ->assertEquals ('*test* ' , $ proxy );
389389
390- $ q = 'test* ' ;
390+ $ q = 'test ' ;
391+ $ proxy = $ method ->invoke (new \search_elastic \query , $ q ); // Get result of invoked method.
392+ $ this ->assertEquals ('*test* ' , $ proxy );
393+
394+ $ q = 'test* ' ;
391395 $ proxy = $ method ->invoke (new \search_elastic \query , $ q );
392396 $ this ->assertEquals ('*test* ' , $ proxy );
393397
394- $ q = '*test ' ;
398+ $ q = ' *test ' ;
395399 $ proxy = $ method ->invoke (new \search_elastic \query , $ q );
396400 $ this ->assertEquals ('*test* ' , $ proxy );
397401
@@ -403,13 +407,25 @@ public function test_construct_wildcard() {
403407 $ proxy = $ method ->invoke (new \search_elastic \query , $ q );
404408 $ this ->assertEquals ('*lazy* *brown* *dog* ' , $ proxy );
405409
410+ $ q = 'lazy brown dog ' ;
411+ $ proxy = $ method ->invoke (new \search_elastic \query , $ q );
412+ $ this ->assertEquals ('*lazy* *brown* *dog* ' , $ proxy );
413+
406414 $ q = 'this and that ' ;
407415 $ proxy = $ method ->invoke (new \search_elastic \query , $ q );
408416 $ this ->assertEquals ('*this* and *that* ' , $ proxy );
409417
418+ $ q = 'this AND that ' ;
419+ $ proxy = $ method ->invoke (new \search_elastic \query , $ q );
420+ $ this ->assertEquals ('*this* AND *that* ' , $ proxy );
421+
410422 $ q = 'this or that ' ;
411423 $ proxy = $ method ->invoke (new \search_elastic \query , $ q );
412424 $ this ->assertEquals ('*this* or *that* ' , $ proxy );
425+
426+ $ q = 'this Or that ' ;
427+ $ proxy = $ method ->invoke (new \search_elastic \query , $ q );
428+ $ this ->assertEquals ('*this* Or *that* ' , $ proxy );
413429 }
414430
415431}
0 commit comments