Esempio n. 1
0
 /**
  * @group ZF-8382
  */
 public function testWriteWithFormatter()
 {
     $event = array('message' => 'tottakai', 'priority' => Zend_Log::ERR);
     $writer = Zend_Log_Writer_Syslog::factory(array());
     require_once 'Zend/Log/Formatter/Simple.php';
     $formatter = new Zend_Log_Formatter_Simple('%message% (this is a test)');
     $writer->setFormatter($formatter);
     $writer->write($event);
 }
 public function testFactory()
 {
     $cfg = array('application' => 'my app', 'facility' => LOG_USER);
     $writer = Zend_Log_Writer_Syslog::factory($cfg);
     $this->assertTrue($writer instanceof Zend_Log_Writer_Syslog);
 }