| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | 15 | public function validate($n) |
|
| 45 | { |
||
| 46 | 15 | if ($this->_limit > $n) { |
|
| 47 | 4 | $exception = new Mockery\Exception\InvalidCountException( |
|
| 48 | 4 | 'Method ' . (string) $this->_expectation |
|
| 49 | 4 | . ' from ' . $this->_expectation->getMock()->mockery_getName() |
|
| 50 | 4 | . ' should be called' . PHP_EOL |
|
| 51 | 4 | . ' at least ' . $this->_limit . ' times but called ' . $n |
|
| 52 | 4 | . ' times.' |
|
| 53 | 4 | ); |
|
| 54 | 4 | $exception->setMock($this->_expectation->getMock()) |
|
| 55 | 4 | ->setMethodName((string) $this->_expectation) |
|
| 56 | 4 | ->setExpectedCountComparative('>=') |
|
| 57 | 4 | ->setExpectedCount($this->_limit) |
|
| 58 | 4 | ->setActualCount($n); |
|
| 59 | 4 | throw $exception; |
|
| 60 | } |
||
| 61 | 13 | } |
|
| 62 | } |
||
| 63 |