public function testExceptionIsThrownInHash($functionName) { $this->setExpectedException('DomainException', 'Callback exception'); $functionName($this->hash, [$this, 'exception']); }