Esempio n. 1
0
 public function testWhere()
 {
     $criteria = new \Reach\Sphinx\Criteria(['limit' => 2]);
     $query = \Model\Sphinx\TestIndex::query($criteria);
     $this->assertInstanceOf('\\Reach\\Sphinx\\Query', $query);
     $resultSet = $query->comment('test')->search('game')->addBetween('viewCount', 1, 1000)->all();
     $this->assertInstanceOf('\\Reach\\Sphinx\\ResultSet', $resultSet);
     $this->assertEquals(2, $resultSet->count());
 }
Esempio n. 2
0
 public function testConnection()
 {
     $connection = \Model\Sphinx\TestIndex::getConnection();
     $this->assertInstanceOf('\\Reach\\Sphinx\\Connection', $connection);
 }