Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
4 | public function testExtraction() |
||
5 | { |
||
6 | $extractor = new HTMLTextExtractor(); |
||
7 | |||
8 | $content = $extractor->getContent(Director::baseFolder() . '/textextraction/tests/fixtures/test1.html'); |
||
9 | $this->assertContains('Test Headline', $content); |
||
10 | $this->assertNotContains('Test Comment', $content, 'Strips HTML comments'); |
||
11 | $this->assertNotContains('Test Style', $content, 'Strips non-content style tags'); |
||
12 | $this->assertNotContains('Test Script', $content, 'Strips non-content script tags'); |
||
13 | } |
||
14 | } |
||
15 |
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.