PHPUnit_Framework_MockObject_Matcher_InvokedRecorder
in package
implements
PHPUnit_Framework_MockObject_Matcher_Invocation
Records invocations and provides convenience methods for checking them later on.
This abstract class can be implemented by matchers which needs to check the number of times an invocation has occured.
Tags
Interfaces, Classes and Traits
- PHPUnit_Framework_MockObject_Matcher_Invocation
- Interface for classes which matches an invocation based on its method name, argument, order or call count.
Table of Contents
- $invocations : array<string|int, PHPUnit_Framework_MockObject_Invocation>
- getInvocationCount() : int
- getInvocations() : array<string|int, PHPUnit_Framework_MockObject_Invocation>
- hasBeenInvoked() : bool
- invoked() : mixed
- Registers the invocation $invocation in the object as being invoked.
- matches() : bool
- Checks if the invocation $invocation matches the current rules. If it does the matcher will get the invoked() method called which should check if an expectation is met.
Properties
$invocations
protected
array<string|int, PHPUnit_Framework_MockObject_Invocation>
$invocations
= array()
Methods
getInvocationCount()
public
getInvocationCount() : int
Return values
int —getInvocations()
public
getInvocations() : array<string|int, PHPUnit_Framework_MockObject_Invocation>
Return values
array<string|int, PHPUnit_Framework_MockObject_Invocation> —hasBeenInvoked()
public
hasBeenInvoked() : bool
Return values
bool —invoked()
Registers the invocation $invocation in the object as being invoked.
public
invoked(PHPUnit_Framework_MockObject_Invocation $invocation) : mixed
Parameters
- $invocation : PHPUnit_Framework_MockObject_Invocation
Return values
mixed —matches()
Checks if the invocation $invocation matches the current rules. If it does the matcher will get the invoked() method called which should check if an expectation is met.
public
matches(PHPUnit_Framework_MockObject_Invocation $invocation) : bool
Parameters
- $invocation : PHPUnit_Framework_MockObject_Invocation