| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 107 | public function validate($n) |
|
| 34 | { |
||
| 35 | 107 | if ($this->_limit !== $n) { |
|
| 36 | 21 | $exception = new Mockery\Exception\InvalidCountException( |
|
| 37 | 21 | 'Method ' . (string) $this->_expectation |
|
| 38 | 21 | . ' from ' . $this->_expectation->getMock()->mockery_getName() |
|
| 39 | 21 | . ' should be called' . PHP_EOL |
|
| 40 | 21 | . ' exactly ' . $this->_limit . ' times but called ' . $n |
|
| 41 | 21 | . ' times.' |
|
| 42 | 21 | ); |
|
| 43 | 21 | $exception->setMock($this->_expectation->getMock()) |
|
| 44 | 21 | ->setMethodName((string) $this->_expectation) |
|
| 45 | 21 | ->setExpectedCountComparative('=') |
|
| 46 | 21 | ->setExpectedCount($this->_limit) |
|
| 47 | 21 | ->setActualCount($n); |
|
| 48 | 21 | throw $exception; |
|
| 49 | } |
||
| 50 | 92 | } |
|
| 51 | } |
||
| 52 |