Documentation

PHPUnit_Framework_MockObject_InvocationMocker
in package
implements PHPUnit_Framework_MockObject_Stub_MatcherCollection, PHPUnit_Framework_MockObject_Invokable, PHPUnit_Framework_MockObject_Builder_Namespace

Mocker for invocations which are sent from PHPUnit_Framework_MockObject_MockObject objects.

Keeps track of all expectations and stubs as well as registering identifications for builders.

Tags
since

Class available since Release 1.0.0

Interfaces, Classes and Traits

PHPUnit_Framework_MockObject_Stub_MatcherCollection
Stubs a method by returning a user-defined value.
PHPUnit_Framework_MockObject_Invokable
Interface for classes which can be invoked.
PHPUnit_Framework_MockObject_Builder_Namespace
Interface for builders which can register builders with a given identification.

Table of Contents

$builderMap  : array<string|int, PHPUnit_Framework_MockObject_Builder_Match>
$matchers  : array<string|int, PHPUnit_Framework_MockObject_Matcher_Invocation>
addMatcher()  : mixed
Adds a new matcher to the collection which can be used as an expectation or a stub.
expects()  : PHPUnit_Framework_MockObject_Builder_InvocationMocker
hasMatchers()  : mixed
invoke()  : mixed
Invokes the invocation object $invocation so that it can be checked for expectations or matched against stubs.
lookupId()  : bool|null
Looks up the match builder with identification $id and returns it.
matches()  : bool
Checks if the invocation matches.
registerId()  : mixed
Registers the match builder $builder with the identification $id. The builder can later be looked up using lookupId() to figure out if it has been invoked.
verify()  : bool

Properties

Methods

hasMatchers()

public hasMatchers() : mixed
Tags
since

Method available since Release 1.1.0

Return values
mixed

lookupId()

Looks up the match builder with identification $id and returns it.

public lookupId(mixed $id) : bool|null
Parameters
$id : mixed
Return values
bool|null

Search results