MonologHandlerSyslogHandlerTest

The Gravity PDF Monolog Handler SyslogHandlerTest class.

Defined (1)

The class is defined in the following location(s).

/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php  
  1. class SyslogHandlerTest extends \PHPUnit_Framework_TestCase 
  2. /** 
  3. * @covers Monolog\Handler\SyslogHandler::__construct 
  4. */ 
  5. public function testConstruct() 
  6. $handler = new SyslogHandler('test'); 
  7. $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); 
  8.  
  9. $handler = new SyslogHandler('test', LOG_USER); 
  10. $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); 
  11.  
  12. $handler = new SyslogHandler('test', 'user'); 
  13. $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); 
  14.  
  15. $handler = new SyslogHandler('test', LOG_USER, Logger::DEBUG, true, LOG_PERROR); 
  16. $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); 
  17.  
  18. /** 
  19. * @covers Monolog\Handler\SyslogHandler::__construct 
  20. */ 
  21. public function testConstructInvalidFacility() 
  22. $this->setExpectedException('UnexpectedValueException'); 
  23. $handler = new SyslogHandler('test', 'unknown');