Basho\Tests\SecondaryIndexOperationsTest::testRangeQuery PHP Method

testRangeQuery() public method

public testRangeQuery ( )
    public function testRangeQuery()
    {
        $command = (new Command\Builder\QueryIndex(static::$riak))->buildBucket('Students' . static::$bucket, static::LEVELDB_BUCKET_TYPE)->withIndexName('grade_bin')->withRangeValue('A', 'B')->build();
        $response = $command->execute();
        $this->assertEquals('200', $response->getCode());
        $matches = $response->getResults();
        sort($matches, SORT_NATURAL | SORT_FLAG_CASE);
        $this->assertEquals(334, count($matches));
        $this->assertEquals(['student0', 'student1', 'student6', 'student7'], array_slice($matches, 0, 4));
    }