interface PHPUnit_Framework_MockObject_Invokable implements PHPUnit_Framework_MockObject_Verifiable (View source)

Interface for classes which can be invoked.

The invocation will be taken from a mock object and passed to an object of this class.

Methods

verify()

Verifies that the current expectation is valid. If everything is OK the code should just return, if not it must throw an exception.

object
invoke(PHPUnit_Framework_MockObject_Invocation $invocation)

Invokes the invocation object $invocation so that it can be checked for expectations or matched against stubs.

bool
matches(PHPUnit_Framework_MockObject_Invocation $invocation)

Checks if the invocation matches.

Details

verify()

Verifies that the current expectation is valid. If everything is OK the code should just return, if not it must throw an exception.

Exceptions

ExpectationFailedException

object invoke(PHPUnit_Framework_MockObject_Invocation $invocation)

Invokes the invocation object $invocation so that it can be checked for expectations or matched against stubs.

Parameters

PHPUnit_Framework_MockObject_Invocation $invocation The invocation object passed from mock object

Return Value

object

bool matches(PHPUnit_Framework_MockObject_Invocation $invocation)

Checks if the invocation matches.

Parameters

PHPUnit_Framework_MockObject_Invocation $invocation The invocation object passed from mock object

Return Value

bool