/** * @covers Phossa\Event\EventDispatcher::error */ public function testError() { $this->object->error(function () { echo "ERROR"; return true; }); trigger_error("wow"); $this->expectOutputString("ERROR"); }