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