| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public function testRemovePageFromShortlist() { |
||
| 27 | $shortlist = $this->objFromFixture('ShortList', 'test'); |
||
| 28 | $testpage = $this->objFromFixture('Page', 'page1'); |
||
| 29 | |||
| 30 | $this->get('shortlist/add?id=' . $testpage->ID . '&type=Page&s=' . session_id() . '&output=0'); |
||
| 31 | |||
| 32 | $shortlist = DataObject::get_one('ShortList', array('SessionID' => session_id())); |
||
| 33 | |||
| 34 | $this->get('shortlist/remove?id=' . $testpage->ID . '&type=Page&s=' . session_id() . '&output=0'); |
||
| 35 | |||
| 36 | $this->assertEquals($shortlist->ShortListItems()->Count(), 0); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |
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.