public function testExceptionIsThrownInArray($fn) { $this->setExpectedException('DomainException', 'Callback exception'); $fn($this->list, [$this, 'exception']); }