Skip to content

Commit 9624105

Browse files
committed
Implement Crap4jTest
1 parent 4dc1e82 commit 9624105

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/Common/Report/Crap4jTest.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ public function testProcess()
2727
return;
2828
}
2929

30-
$this->markTestIncomplete();
30+
$report = $this->getMockBuilder('SebastianBergmann\CodeCoverage\Report\Crap4j')
31+
->disableOriginalConstructor()
32+
->getMock();
33+
34+
$coverage = $this->createMock('SebastianBergmann\CodeCoverage\CodeCoverage');
35+
$coverage->expects($this->once())
36+
->method('getReport')
37+
->will($this->returnValue($report));
38+
39+
$report = new Crap4j();
40+
$result = $report->process($coverage);
41+
42+
$this->assertTrue(strpos($result, '<?xml version="1.0" encoding="UTF-8"?>') === 0);
43+
3144
}
3245
}

0 commit comments

Comments
 (0)