Basho\Tests\SearchOperationsTest::testSearchWithSort PHP Method

testSearchWithSort() public method

public testSearchWithSort ( )
    public function testSearchWithSort()
    {
        $command = (new Command\Builder\Search\FetchObjects(static::$riak))->withQuery('name_s:*Gi*')->withIndexName(static::INDEX)->withSortField("name_s asc")->build();
        $response = $command->execute();
        $this->assertEquals('200', $response->getCode(), $response->getMessage());
        $this->assertEquals(2, $response->getNumFound());
        $this->assertEquals('B. Gionta', $response->getDocs()[0]->name_s);
    }