Total Complexity | 2 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class DefaultProcessorPropertiesTest extends TestCase |
||
9 | { |
||
10 | public function test_defaults() |
||
11 | { |
||
12 | $processor = new Memory([]); |
||
13 | |||
14 | $this->assertAttributeSame(-1, 'levels', $processor); |
||
15 | $this->assertAttributeSame('timestamp [levelname]: message', 'format', $processor); |
||
16 | $this->assertAttributeSame('', 'formatted', $processor); |
||
17 | } |
||
18 | |||
19 | public function test_constructor_settings() |
||
20 | { |
||
21 | $processor = new Memory([ |
||
22 | 'levels' => Logger::ALERT | Logger::NOTICE | Logger::WARNING, |
||
23 | 'format' => '[level] message' |
||
24 | ]); |
||
25 | |||
26 | $this->assertSame(50, $processor->levels()); |
||
27 | $this->assertAttributeSame('[level] message', 'format', $processor); |
||
28 | } |
||
30 |