Skip to content

Instantly share code, notes, and snippets.

@michaeltwofish
Created February 4, 2011 02:05
Show Gist options
  • Save michaeltwofish/810626 to your computer and use it in GitHub Desktop.
Save michaeltwofish/810626 to your computer and use it in GitHub Desktop.
public function testMap() {
$model = $this->_model;
$model::config(array('connection' => false));
$collection = new DocumentSet(compact('model'));
$collection->map(function($data) {return $data;})
$this->assertEqual($model, $collection->model()); // passes because map() doesn't run
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment