| Total Complexity | 5 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | trait MockWithExpectationsTrait |
||
| 12 | { |
||
| 13 | private $mockWithExpectations; |
||
| 14 | |||
| 15 | protected function mockWithExpectations( |
||
| 16 | $className, |
||
| 17 | array $expectations = [], |
||
| 18 | array $constructorArgs = null): PHPUnit_Framework_MockObject_MockObject |
||
| 19 | { |
||
| 20 | return $this->getMockWithExpectations()->mockWithExpectations( |
||
| 21 | $className, |
||
| 22 | $expectations, |
||
| 23 | $constructorArgs |
||
| 24 | ); |
||
| 25 | } |
||
| 26 | |||
| 27 | protected function setExpectation( |
||
| 28 | PHPUnit_Framework_MockObject_MockObject $mock, |
||
| 29 | $expectation) : void |
||
| 30 | { |
||
| 31 | $this->getMockWithExpectations()->setExpectation($mock, $expectation); |
||
| 32 | } |
||
| 33 | |||
| 34 | protected function setExpectations( |
||
| 39 | } |
||
| 40 | |||
| 41 | protected function getMockWithExpectations() : MockWithExpectations |
||
| 48 | } |
||
| 49 | } |
||
| 50 |