| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function testAddItemtoShortList() |
||
| 17 | { |
||
| 18 | $testpage = $this->objFromFixture('Page', 'page1'); |
||
| 19 | |||
| 20 | // create the shortlist |
||
| 21 | $shortlist = new ShortList(); |
||
| 22 | $shortlist->write(); |
||
| 23 | |||
| 24 | $this->assertEquals($shortlist->ShortListItems()->Count(), 0); |
||
|
2 ignored issues
–
show
|
|||
| 25 | |||
| 26 | // create the item. |
||
| 27 | $item = new ShortListItem(); |
||
| 28 | $item->ItemType = $testpage->ClassName; |
||
|
1 ignored issue
–
show
|
|||
| 29 | $item->ItemID = $testpage->ID; |
||
| 30 | $item->write(); |
||
| 31 | |||
| 32 | // add to the shortlist. |
||
| 33 | $shortlist->ShortListItems()->add($item); |
||
|
1 ignored issue
–
show
|
|||
| 34 | $shortlist->write(); |
||
| 35 | |||
| 36 | // do we have an item added? |
||
| 37 | $this->assertNotEquals($shortlist->ShortListItems()->Count(), 0); |
||
|
2 ignored issues
–
show
|
|||
| 38 | // what about the reverse side? |
||
| 39 | $this->assertNotEquals($item->ShortList()->ID, 0); |
||
|
2 ignored issues
–
show
|
|||
| 40 | } |
||
| 41 | |||
| 73 |
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.