public function PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex::matches

Parameters

PHPUnit_Framework_MockObject_Invocation $invocation:

Return value

boolean

Overrides PHPUnit_Framework_MockObject_Matcher_Invocation::matches

File

drupal/core/vendor/phpunit/phpunit-mock-objects/PHPUnit/Framework/MockObject/Matcher/InvokedAtIndex.php, line 95

Class

PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
Invocation matcher which checks if a method was invoked at a certain index.

Code

public function matches(PHPUnit_Framework_MockObject_Invocation $invocation) {
  $this->currentIndex++;
  return $this->currentIndex == $this->sequenceIndex;
}