/** * @return null */ public function setUp() { $this->output = $this->getMock('Appfuel\\Kernel\\OutputInterface'); $func = function ($data) { echo $data; }; $this->output->expects($this->any())->method('renderError')->will($this->returnCallback($func)); $this->handler = new FaultHandler($this->output); }