CompositeExpectation
in package
implements
ExpectationInterface
Interfaces, Classes and Traits
Table of Contents
- $_expectations : array<string|int, mixed>
- Stores an array of all expectations for this composite
- __call() : self
- Intercept any expectation calls and direct against all expectations
- __toString() : string
- Return the string summary of this composite expectation
- add() : void
- Add an expectation to the composite
- andReturn() : self
- andReturns() : self
- Set a return value, or sequential queue of return values
- getMock() : MockInterface|LegacyMockInterface
- Return the parent mock of the first expectation
- getOrderNumber() : int
- Return order number of the first expectation
- mock() : LegacyMockInterface|MockInterface
- Mockery API alias to getMock
- shouldNotReceive() : Expectation
- Starts a new expectation addition on the first mock which is the primary target outside of a demeter chain
- shouldReceive() : Expectation
- Starts a new expectation addition on the first mock which is the primary target outside of a demeter chain
Properties
$_expectations
Stores an array of all expectations for this composite
protected
array<string|int, mixed>
$_expectations
= array()
Methods
__call()
Intercept any expectation calls and direct against all expectations
public
__call(string $method, array<string|int, mixed> $args) : self
Parameters
- $method : string
- $args : array<string|int, mixed>
Return values
self —__toString()
Return the string summary of this composite expectation
public
__toString() : string
Return values
string —add()
Add an expectation to the composite
public
add(Expectation|CompositeExpectation $expectation) : void
Parameters
- $expectation : Expectation|CompositeExpectation
Return values
void —andReturn()
public
andReturn(mixed ...$args) : self
Parameters
- $args : mixed
Return values
self —andReturns()
Set a return value, or sequential queue of return values
public
andReturns(mixed ...$args) : self
Parameters
- $args : mixed
Return values
self —getMock()
Return the parent mock of the first expectation
public
getMock() : MockInterface|LegacyMockInterface
Return values
MockInterface|LegacyMockInterface —getOrderNumber()
Return order number of the first expectation
public
getOrderNumber() : int
Return values
int —mock()
Mockery API alias to getMock
public
mock() : LegacyMockInterface|MockInterface
Return values
LegacyMockInterface|MockInterface —shouldNotReceive()
Starts a new expectation addition on the first mock which is the primary target outside of a demeter chain
public
shouldNotReceive(mixed ...$args) : Expectation
Parameters
- $args : mixed
Return values
Expectation —shouldReceive()
Starts a new expectation addition on the first mock which is the primary target outside of a demeter chain
public
shouldReceive(mixed ...$args) : Expectation
Parameters
- $args : mixed