PHPUnit_Framework_MockObject_Matcher_InvokedCount
class PHPUnit_Framework_MockObject_Matcher_InvokedCount extends PHPUnit_Framework_MockObject_Matcher_InvokedRecorder (View source)
Invocation matcher which checks if a method has been invoked a certain amount of times.
If the number of invocations exceeds the value it will immediately throw an exception, If the number is less it will later be checked in verify() and also throw an exception.
Properties
protected PHPUnit_Framework_MockObject_Invocation[] | $invocations | from PHPUnit_Framework_MockObject_Matcher_InvokedRecorder | |
protected int | $expectedCount |
Methods
getInvocations()
No description
mixed
bool
__construct(int $expectedCount)
No description
bool
isNever()
No description
string
toString()
No description
verify()
Verifies that the current expectation is valid. If everything is OK the code should just return, if not it must throw an exception.
Details
int
getInvocationCount()
PHPUnit_Framework_MockObject_Invocation[]
getInvocations()
bool
hasBeenInvoked()
at line 57
mixed
invoked(PHPUnit_Framework_MockObject_Invocation $invocation)
bool
matches(PHPUnit_Framework_MockObject_Invocation $invocation)
at line 31
__construct(int $expectedCount)
at line 39
bool
isNever()
at line 47
string
toString()
at line 95
verify()
Verifies that the current expectation is valid. If everything is OK the code should just return, if not it must throw an exception.