Conditions | 3 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 1 | Features | 1 |
1 | <?php |
||
14 | public function assertReadme($filename, $formatIdentifier = '') |
||
15 | { |
||
16 | $this->addToAssertionCount(1); |
||
17 | |||
18 | $file = new \SplFileObject($filename); |
||
19 | |||
20 | if (!$formatIdentifier) { |
||
21 | $formatIdentifier = $file->getExtension(); |
||
22 | } |
||
23 | |||
24 | $format = $this->getFormatFactory()->createFormat($formatIdentifier); |
||
25 | |||
26 | $tester = new readmetester\ReadmeTester; |
||
27 | $result = $this->getTestResultObject(); |
||
28 | |||
29 | foreach ($tester->test($file, $format) as $line) { |
||
30 | $result->addFailure($this, new \PHPUnit_Framework_AssertionFailedError($line), 0.0); |
||
31 | } |
||
32 | } |
||
33 | } |
||
34 |