public function testArrayOfObjects()
{
$schema = new DocumentSchema();
$first = (object) array('name' => 'First');
$second = (object) array('name' => 'Second');
$third = (object) array('name' => 'Third');
$doc = new DocumentSet(compact('schema') + array('data' => array($first, $second, $third)));
$this->assertInternalType('object', $doc[0]);
$this->assertInternalType('object', $doc[1]);
$this->assertInternalType('object', $doc[2]);
$this->assertCount(3, $doc);
}