| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 42 | public function assertFile(\SplFileObject $file, $formatIdentifier = '') |
||
| 43 | { |
||
| 44 | $format = $this->formatFactory->createFormat($formatIdentifier ?: $file->getExtension()); |
||
| 45 | $result = $this->testCase->getTestResultObject(); |
||
| 46 | |||
| 47 | foreach ($this->tester->test($file, $format) as $example => $returnObj) { |
||
| 48 | $this->testCase->addToAssertionCount(1); |
||
| 49 | if ($returnObj->isFailure()) { |
||
| 50 | $result->addFailure( |
||
| 51 | $this->testCase, |
||
| 52 | new \PHPUnit_Framework_AssertionFailedError("Example $example: {$returnObj->getMessage()}"), |
||
| 53 | 0.0 |
||
| 54 | ); |
||
| 55 | } |
||
| 56 | } |
||
| 57 | } |
||
| 58 | |||
| 64 |