public function testExceptionThrownInIteratorCallbackWhileReduceRight() { $this->setExpectedException('DomainException', 'Callback exception: 2'); reduce_right($this->listIterator, [$this, 'exception']); }