public function testExceptionIsThrownInIterator() { $this->setExpectedException('DomainException', 'Callback exception'); group($this->listIterator, [$this, 'exception']); }