PHPUnit2
[ class tree: PHPUnit2 ] [ index: PHPUnit2 ] [ all elements ]

Class: PHPUnit2_Extensions_MockObject_Matcher_Invocation

Source Location: /PHPUnit2-3.0.0alpha11/Extensions/MockObject/Matcher/Invocation.php

Class Overview

PHPUnit2_Framework_SelfDescribing
   |
   --PHPUnit2_Extensions_MockObject_Matcher_Invocation

Interface for classes which matches an invocation based on its method name, argument, order or call count.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>

Methods


Inherited Variables

Inherited Methods

Class: PHPUnit2_Framework_SelfDescribing

PHPUnit2_Framework_SelfDescribing::toString()
Returns a string representation of the object.

Class Details

[line 71]
Interface for classes which matches an invocation based on its method name, argument, order or call count.


[ Top ]


Method Detail

invoked   [line 88]

mixed invoked( PHPUnit2_Extensions_MockObject_Invocation $invocation)

Registers the invocation $invocation in the object as being invoked.

This will only occur after matches() returns true which means the current invocation is the correct one.

The matcher can store information from the invocation which can later be checked in verify(), or it can check the values directly and throw and exception if an expectation is not met.

If the matcher is a stub it will also have a return value.

  • Access: public

Parameters:

PHPUnit2_Extensions_MockObject_Invocation   $invocation   —  Object containing information on a mocked or stubbed method which was invoked.

[ Top ]

matches   [line 99]

bool matches( PHPUnit2_Extensions_MockObject_Invocation $invocation)

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.
  • Access: public

Parameters:

PHPUnit2_Extensions_MockObject_Invocation   $invocation   —  Object containing information on a mocked or stubbed method which was invoked.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:40:38 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.