AtMost
extends CountValidatorAbstract
in package
Table of Contents
- $_expectation : Expectation
- Expectation for which this validator is assigned
- $_limit : int
- Call count limit
- __construct() : mixed
- Set Expectation object and upper call limit
- isEligible() : bool
- Checks if the validator can accept an additional nth call
- validate() : bool
- Validate the call count against this validator
Properties
$_expectation
Expectation for which this validator is assigned
protected
Expectation
$_expectation
= null
$_limit
Call count limit
protected
int
$_limit
= null
Methods
__construct()
Set Expectation object and upper call limit
public
__construct(Expectation $expectation, int $limit) : mixed
Parameters
- $expectation : Expectation
- $limit : int
Return values
mixed —isEligible()
Checks if the validator can accept an additional nth call
public
isEligible(int $n) : bool
Parameters
- $n : int
Return values
bool —validate()
Validate the call count against this validator
public
validate(int $n) : bool
Parameters
- $n : int