Total Complexity | 4 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | class JunitOutputFormatterTest extends AbstractOutputFormatterTest |
||
11 | { |
||
12 | public function testName(): void |
||
15 | } |
||
16 | |||
17 | public function testNoIssues(): void |
||
31 | } |
||
32 | |||
33 | public function testWithIssues(): void |
||
34 | { |
||
35 | $expectedOuput = <<<XML |
||
36 | <?xml version="1.0" encoding="UTF-8"?> |
||
37 | <testsuites name="SARB" tests="3" failures="3"> |
||
38 | <testsuite name="FILE_1" errors="0" tests="2" failures="2"> |
||
39 | <testcase name="TYPE_1 at /FILE_1 (10:10)"> |
||
40 | <failure type="warning" message="MESSAGE_1"/> |
||
41 | </testcase> |
||
42 | <testcase name="TYPE_2 at /FILE_1 (12:0)"> |
||
43 | <failure type="error" message="MESSAGE_2"/> |
||
44 | </testcase> |
||
45 | </testsuite> |
||
46 | <testsuite name="FILE_2" errors="0" tests="1" failures="1"> |
||
47 | <testcase name="TYPE_1 at /FILE_2 (0:0)"> |
||
48 | <failure type="error" message="MESSAGE_3"/> |
||
49 | </testcase> |
||
50 | </testsuite> |
||
51 | </testsuites> |
||
52 | |||
53 | XML; |
||
54 | $this->assertIssuesOutput($expectedOuput); |
||
55 | } |
||
56 | |||
57 | protected function getOutputFormatter(): OutputFormatter |
||
60 | } |
||
61 | } |
||
62 |