Basho\Tests\Riak\ObjectTest::testGetIndex PHP Method

testGetIndex() public method

public testGetIndex ( )
    public function testGetIndex()
    {
        $data = new \StdClass();
        $data->woot = 'sauce';
        $headers = ['x-riak-index-foo_bin' => 'bar, baz', 'x-riak-index-foo_int' => '42, 50'];
        $object = new RObject($data, $headers);
        $index = $object->getIndex('foo_bin');
        $this->assertNotNull($index);
        $this->assertEquals(['bar', 'baz'], $index);
    }