public function test_can_construct_one_to_many_relationship() { $object = new PodioObject(); $object->has_many('fields', 'Object'); $object->init(array('fields' => array(array('id' => 1), array('id' => 1)))); $this->assertInstanceOf('PodioCollection', $object->fields); foreach ($object->fields as $member) { $this->assertInstanceOf('PodioObject', $member); } }