Exemplo n.º 1
0
 public function testSetStringThreshold()
 {
     $appender = new LoggerAppenderEcho("LoggerAppenderTest");
     $layout = new LoggerLayoutSimple();
     $appender->setLayout($layout);
     $warn = LoggerLevel::getLevelWarn();
     $appender->setThreshold('WARN');
     $a = $appender->getThreshold();
     self::assertEquals($warn, $a);
     $e = LoggerLevel::getLevelFatal();
     $appender->setThreshold('FATAL');
     $a = $appender->getThreshold();
     self::assertEquals($e, $a);
     $e = LoggerLevel::getLevelError();
     $appender->setThreshold('ERROR');
     $a = $appender->getThreshold();
     self::assertEquals($e, $a);
     $e = LoggerLevel::getLevelDebug();
     $appender->setThreshold('DEBUG');
     $a = $appender->getThreshold();
     self::assertEquals($e, $a);
     $e = LoggerLevel::getLevelInfo();
     $appender->setThreshold('INFO');
     $a = $appender->getThreshold();
     self::assertEquals($e, $a);
 }