From 21fff9429c7ae757a44aeeb2b09d3b36cda8b017 Mon Sep 17 00:00:00 2001 From: Paul Klimov Date: Thu, 19 Dec 2013 12:21:20 +0200 Subject: [PATCH] Mongo full text search test updated. --- tests/unit/extensions/mongodb/CollectionTest.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unit/extensions/mongodb/CollectionTest.php b/tests/unit/extensions/mongodb/CollectionTest.php index 24ffc6c..fb6238d 100644 --- a/tests/unit/extensions/mongodb/CollectionTest.php +++ b/tests/unit/extensions/mongodb/CollectionTest.php @@ -303,11 +303,17 @@ class CollectionTest extends MongoDbTestCase 'status' => 1, 'amount' => 200, ], + [ + 'name' => 'no search keyword', + 'status' => 1, + 'amount' => 200, + ], ]; $collection->batchInsert($rows); $collection->createIndex(['name' => 'text']); - $result = $collection->fullTextSearch('some'); + $result = $collection->fullTextSearch('customer'); $this->assertNotEmpty($result); + $this->assertCount(2, $result); } } \ No newline at end of file