Skip to content

MatcherLeaked ​

Rasuvaeff\Understudy\Exception\MatcherLeaked

Class — Package: rasuvaeff/understudy — Source — Version: v1.1.0-1-g6ed023f

Extends: LogicException

Implements: Throwable, Stringable, Exception\UnderstudyError

A matcher reached a real call instead of a specification closure. Matchers are part of the protocol that records what a call should look like; the code under test must never receive one as a value.

Methods ​

intoRealCall() ​

php
static intoRealCall(
    non-empty-string $method,
    int $position,
    non-empty-string $matcher,
): self

Builds the error for a matcher used in a real call.