| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace DocLister\Tests\MODxAPI; |
||
| 16 | protected function mockMODxAPI() |
||
| 17 | {
|
||
| 18 | /** @var \MODxAPI|\PHPUnit_Framework_MockObject_MockObject $api */ |
||
| 19 | $api = $this->getMockForAbstractClass('MODxAPI', array($this->modx));
|
||
| 20 | $api->expects($this->any()) |
||
| 21 | ->method('edit')
|
||
| 22 | ->will($this->returnValue($api)); |
||
| 23 | |||
| 24 | $api->expects($this->any()) |
||
| 25 | ->method('save')
|
||
| 26 | ->will($this->returnValue($api->getID())); //$this->id || false |
||
| 27 | |||
| 28 | $api->expects($this->any()) |
||
| 29 | ->method('delete')
|
||
| 30 | ->will($this->returnValue(true)); |
||
| 31 | |||
| 32 | return $api; |
||
| 33 | } |
||
| 41 | } |