public function testException_handler() { $status = $this->getMock('DAV_Status', array('output'), array(\DAV::HTTP_FORBIDDEN)); $status->expects($this->once())->method('output'); \BeeHub::exception_handler($status); $this->setExpectedException('PHPUnit_Framework_Error_Warning', 'Some message'); \BeeHub::exception_handler(new \Exception('Some message')); }