scratch – Blame information for rev 115

Subversion Repositories:
Rev:
Rev Author Line No. Line
115 office 1 <?php
2  
3 /*
4 * This file is part of the Monolog package.
5 *
6 * (c) Jordi Boggiano <j.boggiano@seld.be>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11  
12 namespace Monolog\Handler;
13  
14 use Monolog\Logger;
15  
16 class SyslogHandlerTest extends \PHPUnit_Framework_TestCase
17 {
18 /**
19 * @covers Monolog\Handler\SyslogHandler::__construct
20 */
21 public function testConstruct()
22 {
23 $handler = new SyslogHandler('test');
24 $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
25  
26 $handler = new SyslogHandler('test', LOG_USER);
27 $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
28  
29 $handler = new SyslogHandler('test', 'user');
30 $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
31  
32 $handler = new SyslogHandler('test', LOG_USER, Logger::DEBUG, true, LOG_PERROR);
33 $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler);
34 }
35  
36 /**
37 * @covers Monolog\Handler\SyslogHandler::__construct
38 */
39 public function testConstructInvalidFacility()
40 {
41 $this->setExpectedException('UnexpectedValueException');
42 $handler = new SyslogHandler('test', 'unknown');
43 }
44 }