Passed
Pull Request — master (#2)
by Mihail
03:21
created

MemoryTest::test_formatting()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 14
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Koded\Logging\Processors;
4
5
use PHPUnit\Framework\TestCase;
6
7
class MemoryTest extends TestCase
8
{
9
    public function test_formatting()
10
    {
11
        $processor = new Memory([]);
12
13
        $processor->update([
14
            [
15
                'level'     => -1,
16
                'levelname' => 'TEST',
17
                'message'   => 'Hello',
18
                'timestamp' => 1234567890
19
            ],
20
            [
21
                'level'     => -1,
22
                'levelname' => 'TEST',
23
                'message'   => 'World',
24
                'timestamp' => 1234567891
25
            ]
26
        ]);
27
28
        $this->assertContains("1234567890 [TEST]: Hello\n1234567891 [TEST]: World", $processor->formatted());
29
    }
30
}
31