Documentation

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
since

Class available since Release 1.0.0

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

Methods

__construct()

public __construct(int $sequenceIndex) : mixed
Parameters
$sequenceIndex : int
Return values
mixed

Search results