Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 14 |
Ratio | 100 % |
1 | <?php |
||
27 | View Code Duplication | public function testNonExistentImage() |
|
28 | { |
||
29 | $page = $this->objFromFixture('Page', 'page02'); |
||
30 | |||
31 | $galleryImage = $this->objFromFixture('GalleryImage' , 'gi01'); |
||
32 | $nonExistentID = 1000 + $galleryImage->ID; |
||
33 | // his will not exist |
||
34 | $content = "[GalleryImage id='{$nonExistentID}']"; |
||
35 | $page->Content = $content; |
||
36 | $page->write(); |
||
37 | $html = ShortcodeParser::get_active()->parse($page->Content); |
||
38 | |||
39 | $this->assertEquals('image not found', $html); |
||
1 ignored issue
–
show
|
|||
40 | } |
||
41 | } |
||
42 |
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.