Test Failed
Pull Request — master (#132)
by Alessandro
03:15
created

FailuresPrinterTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 28
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testOnEngineEndPrintsInTheRightOrder() 0 25 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Tests\Functional\Printer;
6
7
use Paraunit\Printer\FailuresPrinter;
8
use Tests\BaseFunctionalTestCase;
9
10
/**
11
 * Class FailuresPrinterTest
12
 * @package Tests\Functional\Printer
13
 */
14
class FailuresPrinterTest extends BaseFunctionalTestCase
15
{
16
    public function testOnEngineEndPrintsInTheRightOrder()
17
    {
18
        $this->processAllTheStubLogs();
19
20
        /** @var FailuresPrinter $printer */
21
        $printer = $this->getService(FailuresPrinter::class);
22
23
        $printer->onEngineEnd();
24
25
        $output = $this->getConsoleOutput();
26
27
        $this->assertNotEmpty($output->getOutput());
28
        $this->assertNotContains('PASSED output', $output->getOutput(), '', true);
29
        $this->assertNotContains('SKIPPED output', $output->getOutput(), '', true);
30
        $this->assertNotContains('INCOMPLETE output', $output->getOutput(), '', true);
31
        $this->assertNotContains('files with PASSED', $output->getOutput(), '', true);
32
        $this->assertOutputOrder($output, [
33
            'Unknown',
34
            'Abnormal Terminations (fatal Errors, Segfaults) output:',
35
            'Errors output:',
36
            'Failures output:',
37
            'Warnings output:',
38
            'Risky Outcome output:',
39
        ]);
40
    }
41
}
42