Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
4 | public function testExtraction() |
||
5 | { |
||
6 | $extractor = new PDFTextExtractor(); |
||
7 | if (!$extractor->isAvailable()) { |
||
8 | $this->setExpectedException( |
||
9 | 'FileTextExtractor_Exception', |
||
10 | 'getRawOutput called on unavailable extractor' |
||
11 | ); |
||
12 | } |
||
13 | |||
14 | $content = $extractor->getContent(Director::baseFolder() . '/textextraction/tests/fixtures/test1.pdf'); |
||
15 | $this->assertContains('This is a test file with a link', $content); |
||
16 | } |
||
17 | } |
||
18 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.