public function calling_next_after_closing_collection_raises_exception()
 {
     $c = new MockCollection('~');
     $c->open();
     $c->close();
     $c->next();
 }
 /**
  * Returns a collection 
  *
  * @param   string $name
  * @param   io.collections.IOElement[] $elements
  * @return  io.collections.IOCollection
  */
 protected function newCollection($name, $elements = array())
 {
     $c = new MockCollection($name);
     foreach ($elements as $element) {
         $c->addElement($element);
     }
     return $c;
 }