class InvocationOrder
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
@internal This class is not covered by the backward compatibility promise for PHPUnit
Hierarchy
- class \PHPUnit\Framework\MockObject\Rule\InvocationOrder implements \PHPUnit\Framework\SelfDescribing
Expanded class hierarchy of InvocationOrder
4 files declare their use of InvocationOrder
- InvocationHandler.php in vendor/
phpunit/ phpunit/ src/ Framework/ MockObject/ Runtime/ InvocationHandler.php - Matcher.php in vendor/
phpunit/ phpunit/ src/ Framework/ MockObject/ Runtime/ Matcher.php - MockObject.php in vendor/
phpunit/ phpunit/ src/ Framework/ MockObject/ Runtime/ Interface/ MockObject.php - MockObjectApi.php in vendor/
phpunit/ phpunit/ src/ Framework/ MockObject/ Runtime/ Api/ MockObjectApi.php
File
-
vendor/
phpunit/ phpunit/ src/ Framework/ MockObject/ Runtime/ Rule/ InvocationOrder.php, line 21
Namespace
PHPUnit\Framework\MockObject\RuleView source
abstract class InvocationOrder implements SelfDescribing {
/**
* @psalm-var list<BaseInvocation>
*/
private array $invocations = [];
public function numberOfInvocations() : int {
return count($this->invocations);
}
public function hasBeenInvoked() : bool {
return count($this->invocations) > 0;
}
public final function invoked(BaseInvocation $invocation) : void {
$this->invocations[] = $invocation;
$this->invokedDo($invocation);
}
public abstract function matches(BaseInvocation $invocation) : bool;
public abstract function verify() : void;
protected function invokedDo(BaseInvocation $invocation) : void {
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
InvocationOrder::$invocations | private | property | @psalm-var list<BaseInvocation> | |
InvocationOrder::hasBeenInvoked | public | function | ||
InvocationOrder::invoked | final public | function | ||
InvocationOrder::invokedDo | protected | function | 1 | |
InvocationOrder::matches | abstract public | function | 5 | |
InvocationOrder::numberOfInvocations | public | function | ||
InvocationOrder::verify | abstract public | function | 5 | |
SelfDescribing::toString | public | function | Returns a string representation of the object. | 84 |