Basho\Tests\SecondaryIndexOperationsTest::testFetchObjectWithIndexes PHP Method

testFetchObjectWithIndexes() public method

    public function testFetchObjectWithIndexes()
    {
        $command = (new Command\Builder\FetchObject(static::$riak))->buildLocation(static::$key, 'Users', static::LEVELDB_BUCKET_TYPE)->build();
        $response = $command->execute();
        $this->assertEquals('200', $response->getCode());
        $this->assertInstanceOf('Basho\\Riak\\Object', $response->getObject());
        $this->assertEquals('person', $response->getObject()->getData());
        $this->assertNotEmpty($response->getObject()->getVClock());
        $indexes = $response->getObject()->getIndexes();
        $this->assertEquals($indexes['lucky_numbers_int'], [42, 64]);
        $this->assertEquals($indexes['lastname_bin'], ['Knuth']);
        static::$object = $response->getObject();
        static::$vclock = $response->getObject()->getVClock();
    }