Completed
Push — master ( efa801...d3c12f )
by Mihail
12s queued 11s
created

MemoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 17
rs 10
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