1 | <?php |
||
23 | abstract class CountValidatorAbstract |
||
24 | { |
||
25 | /** |
||
26 | * Expectation for which this validator is assigned |
||
27 | * |
||
28 | * @var \Mockery\Expectation |
||
29 | */ |
||
30 | protected $_expectation = null; |
||
31 | |||
32 | /** |
||
33 | * Call count limit |
||
34 | * |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $_limit = null; |
||
38 | |||
39 | /** |
||
40 | * Set Expectation object and upper call limit |
||
41 | * |
||
42 | * @param \Mockery\Expectation $expectation |
||
43 | * @param int $limit |
||
44 | */ |
||
45 | 159 | public function __construct(\Mockery\Expectation $expectation, $limit) |
|
50 | |||
51 | /** |
||
52 | * Checks if the validator can accept an additional nth call |
||
53 | * |
||
54 | * @param int $n |
||
55 | * @return bool |
||
56 | */ |
||
57 | 135 | public function isEligible($n) |
|
61 | |||
62 | /** |
||
63 | * Validate the call count against this validator |
||
64 | * |
||
65 | * @param int $n |
||
66 | * @return bool |
||
67 | */ |
||
68 | abstract public function validate($n); |
||
69 | } |
||
70 |