Browse Source

Mongo full text search test updated.

tags/2.0.0-beta
Paul Klimov 11 years ago
parent
commit
21fff9429c
  1. 8
      tests/unit/extensions/mongodb/CollectionTest.php

8
tests/unit/extensions/mongodb/CollectionTest.php

@ -303,11 +303,17 @@ class CollectionTest extends MongoDbTestCase
'status' => 1, 'status' => 1,
'amount' => 200, 'amount' => 200,
], ],
[
'name' => 'no search keyword',
'status' => 1,
'amount' => 200,
],
]; ];
$collection->batchInsert($rows); $collection->batchInsert($rows);
$collection->createIndex(['name' => 'text']); $collection->createIndex(['name' => 'text']);
$result = $collection->fullTextSearch('some'); $result = $collection->fullTextSearch('customer');
$this->assertNotEmpty($result); $this->assertNotEmpty($result);
$this->assertCount(2, $result);
} }
} }
Loading…
Cancel
Save