Passed
Push — master ( ddd97a...25aa58 )
by Harry
06:46
created

ErrorHandlerBuilderTest::testGetExceptionLevel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Graze\Monolog;
3
4
use Mockery as m;
5
use Psr\Log\LogLevel;
6
7
class ErrorHandlerBuilderTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function setUp()
10
    {
11
        $this->builder = new ErrorHandlerBuilder();
0 ignored issues
show
Bug Best Practice introduced by
The property builder does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
12
    }
13
14
    public function testGetErrorLevelMap()
15
    {
16
        $this->assertSame(array(), $this->builder->getErrorLevelMap());
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
17
    }
18
19
    public function testSetErrorLevelMap()
20
    {
21
        $map = array('foo' => 'bar');
0 ignored issues
show
Coding Style introduced by
Short array syntax must be used to define arrays
Loading history...
22
23
        $this->builder->setErrorLevelMap($map);
24
        $this->assertSame($map, $this->builder->getErrorLevelMap());
25
    }
26
27
    public function testGetExceptionLevel()
28
    {
29
        $this->assertSame(LogLevel::CRITICAL, $this->builder->getExceptionLevel());
30
    }
31
32
    public function testSetExceptionLevel()
33
    {
34
        $this->builder->setExceptionLevel('foo');
35
        $this->assertSame('foo', $this->builder->getExceptionLevel());
36
    }
37
38
    public function testGetFatalLevel()
39
    {
40
        $this->assertNull($this->builder->getFatalLevel());
41
    }
42
43
    public function testSetFatalLevel()
44
    {
45
        $this->builder->setFatalLevel('foo');
46
        $this->assertSame('foo', $this->builder->getFatalLevel());
47
    }
48
}
49