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

testConstruct() public method

public testConstruct ( )
    public function testConstruct()
    {
        // simple new object
        $object = new RObject();
        $this->assertEmpty($object->getData());
        // more complex object
        $data = new \StdClass();
        $data->woot = 'sauce';
        $object = new RObject($data, ['Content-Type' => 'text/plain']);
        $this->assertEquals('sauce', $object->getData()->woot);
        $this->assertEquals('text/plain', $object->getContentType());
    }