Basho\Tests\SecondaryIndexOperationsTest::testScalarQuery PHP Method

testScalarQuery() public method

public testScalarQuery ( )
    public function testScalarQuery()
    {
        $command = (new Command\Builder\QueryIndex(static::$riak))->buildBucket('Students' . static::$bucket, static::LEVELDB_BUCKET_TYPE)->withIndexName('lucky_numbers_int')->withScalarValue(5)->build();
        $response = $command->execute();
        $this->assertEquals('200', $response->getCode());
        $this->assertEquals(1, count($response->getResults()));
        $this->assertEquals('student5', $response->getResults()[0]);
    }