PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
in package
implements
PHPUnit_Framework_MockObject_Matcher_Invocation
Invocation matcher which checks if a method was invoked at a certain index.
If the expected index number does not match the current invocation index it will not match which means it skips all method and parameter matching. Only once the index is reached will the method and parameter start matching and verifying.
If the index is never reached it will throw an exception in index.
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
- $currentIndex : int
- $sequenceIndex : int
- __construct() : mixed
- 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.
- toString() : string
- verify() : mixed
- Verifies that the current expectation is valid. If everything is OK the code should just return, if not it must throw an exception.
Properties
$currentIndex
protected
int
$currentIndex
= -1
$sequenceIndex
protected
int
$sequenceIndex
Methods
__construct()
public
__construct(int $sequenceIndex) : mixed
Parameters
- $sequenceIndex : int
Return values
mixed —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
Return values
bool —toString()
public
toString() : string
Return values
string —verify()
Verifies that the current expectation is valid. If everything is OK the code should just return, if not it must throw an exception.
public
verify() : mixed