| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 38 | public function testRemovePageFromShortlist() { |
||
| 39 | $shortlist = $this->objFromFixture('ShortList', 'test'); |
||
| 40 | $testpage = $this->objFromFixture('Page', 'page1'); |
||
| 41 | |||
| 42 | $this->get('shortlist/add?id=' . $testpage->ID . '&type=Page&s=' . session_id()); |
||
| 43 | |||
| 44 | $shortlist = DataObject::get_one('ShortList', array('SessionID' => session_id())); |
||
| 45 | |||
| 46 | $this->get('shortlist/remove?id=' . $testpage->ID . '&type=Page&s=' . session_id()); |
||
| 47 | |||
| 48 | $this->assertEquals($shortlist->ShortListItems()->Count(), 0); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
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.