| Conditions | 1 |
| Paths | 1 |
| Total Lines | 27 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function testAddItemtoShortList() |
||
| 17 | { |
||
| 18 | $testpage = $this->objFromFixture('Page', 'page1'); |
||
| 19 | Session::start(); |
||
| 20 | $sessionID = session_id(); |
||
| 21 | |||
| 22 | // create the shortlist |
||
| 23 | $shortlist = new ShortList(); |
||
| 24 | $shortlist->write(); |
||
| 25 | |||
| 26 | $this->assertEquals($shortlist->ShortListItems()->Count(), 0); |
||
|
2 ignored issues
–
show
|
|||
| 27 | |||
| 28 | // create the item. |
||
| 29 | $item = new ShortListItem(); |
||
| 30 | $item->ItemType = $testpage->ClassName; |
||
|
1 ignored issue
–
show
|
|||
| 31 | $item->ItemID = $testpage->ID; |
||
| 32 | $item->write(); |
||
| 33 | |||
| 34 | // add to the shortlist. |
||
| 35 | $shortlist->ShortListItems()->add($item); |
||
|
1 ignored issue
–
show
|
|||
| 36 | $shortlist->write(); |
||
| 37 | |||
| 38 | // do we have an item added? |
||
| 39 | $this->assertNotEquals($shortlist->ShortListItems()->Count(), 0); |
||
|
2 ignored issues
–
show
|
|||
| 40 | // what about the reverse side? |
||
| 41 | $this->assertNotEquals($item->ShortList()->ID, 0); |
||
|
2 ignored issues
–
show
|
|||
| 42 | } |
||
| 43 | |||
| 69 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.