| Conditions | 1 |
| Paths | 1 |
| Total Lines | 30 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function testRemoveItemFromShortList() |
||
| 43 | { |
||
| 44 | $testpage = $this->objFromFixture('Page', 'page1'); |
||
| 45 | |||
| 46 | // create the shortlist |
||
| 47 | $shortlist = new ShortList(); |
||
| 48 | $shortlist->write(); |
||
| 49 | |||
| 50 | $this->assertEquals($shortlist->ShortListItems()->Count(), 0); |
||
|
2 ignored issues
–
show
|
|||
| 51 | |||
| 52 | // create the item. |
||
| 53 | $item = new ShortListItem(); |
||
| 54 | $item->ItemType = $testpage->ClassName; |
||
|
1 ignored issue
–
show
|
|||
| 55 | $item->ItemID = $testpage->ID; |
||
|
1 ignored issue
–
show
|
|||
| 56 | $item->write(); |
||
| 57 | |||
| 58 | // add to the shortlist. |
||
| 59 | $shortlist->ShortListItems()->add($item); |
||
|
1 ignored issue
–
show
|
|||
| 60 | $shortlist->write(); |
||
| 61 | |||
| 62 | // do we have an item added? |
||
| 63 | $this->assertNotEquals($shortlist->ShortListItems()->Count(), 0); |
||
|
2 ignored issues
–
show
|
|||
| 64 | // what about the reverse side? |
||
| 65 | $this->assertNotEquals($item->ShortList()->ID, 0); |
||
|
2 ignored issues
–
show
|
|||
| 66 | |||
| 67 | $shortlist->ShortListItems()->remove($item); |
||
|
1 ignored issue
–
show
|
|||
| 68 | |||
| 69 | // do we have an item removed? |
||
| 70 | $this->assertEquals($shortlist->ShortListItems()->Count(), 0); |
||
|
2 ignored issues
–
show
|
|||
| 71 | } |
||
| 72 | } |
||
| 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.