public function testExceptionThrownInCollection() { $this->setExpectedException('DomainException', 'Callback exception'); some($this->goodIterator, [$this, 'exception']); }