public function testExceptionIsThrownInHashIterator() { $this->setExpectedException('DomainException', 'Callback exception'); reindex($this->hashIterator, [$this, 'exception']); }