public function to($format, array $options = array())
{
$this->offsetGet(null);
return parent::to($format, $options);
}
public function testMap() { $collection = new DocumentSet(); $collection->set(array('title' => 'Lorem Ipsum', 'key' => 'value', 'foo' => 'bar')); $results = $collection->map(function ($value) { return $value . ' test'; }); $expected = array('Lorem Ipsum test', 'value test', 'bar test'); $this->assertEqual($results->to('array'), $expected); $this->assertNotEqual($results->to('array'), $collection->to('array')); }