| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function testExtraction() |
||
| 15 | { |
||
| 16 | $extractor = new PDFTextExtractor(); |
||
| 17 | if (!$extractor->isAvailable()) { |
||
| 18 | $this->expectException(Exception::class); |
||
| 19 | $this->expectExceptionMessage('getRawOutput called on unavailable extractor'); |
||
| 20 | } |
||
| 21 | |||
| 22 | $file = new File(); |
||
| 23 | $file->setFromLocalFile(dirname(__FILE__) . '/fixtures/test1.pdf'); |
||
| 24 | $file->write(); |
||
| 25 | |||
| 26 | $content = $extractor->getContent($file); |
||
| 27 | $this->assertContains('This is a test file with a link', $content); |
||
| 28 | } |
||
| 30 |