Skip to content

NeverMethodCalled

Rasuvaeff\Understudy\Exception\NeverMethodCalled

ClassPackage: rasuvaeff/understudySourceVersion: v0.4.1

Extends: RuntimeException

Implements: Throwable, Stringable, Exception\UnderstudyError

A method declared : never was called without an expectation that throws.

Returning from it is impossible by language rule, so the dispatcher must throw something — this says so explicitly instead of leaking a TypeError.

Methods

withoutExpectation()

php
static withoutExpectation(non-empty-string $label, non-empty-string $method): self

withoutAnAction()

php
static withoutAnAction(non-empty-string $label, non-empty-string $method): self

configuredToReturn()

php
static configuredToReturn(non-empty-string $label, non-empty-string $method): self