/** @expectedException \Elephander\Exceptionizer\UserWarning */
 public function testTriggersUserWarning()
 {
     $eh = new ErrorHandler();
     $eh->registerSelf();
     Exceptionizer::registerWith($eh, Exceptionizer::IncludeWarnings);
     trigger_error("user warning", E_USER_WARNING);
 }
 public function testCallsLateLast()
 {
     $calledLate = false;
     $eh = new ErrorHandler();
     $eh->addErrorHandler(E_USER_WARNING, '/test late/', function () use(&$calledLate) {
         $this->assertEquals(false, $calledLate);
     }, ErrorHandler::Normal);
     $eh->addErrorHandler(E_USER_WARNING, '/test late/', function () use(&$calledLate) {
         $this->assertEquals(false, $calledLate);
         $calledLate = true;
         return true;
     }, ErrorHandler::Late);
     $eh->registerSelf();
     trigger_error("test late last", E_USER_WARNING);
     $this->assertEquals(true, $calledLate);
 }