Skip to content

UnderstudyPlugin

Rasuvaeff\Understudy\Testo\UnderstudyPlugin

ClassPackage: rasuvaeff/understudy-testoSourceVersion: v0.1.3

Implements: Testo\Common\PluginConfigurator

Registers UnderstudyInterceptor so every test of the suite ends with understudy's own bookkeeping done for it: expectations are verified after a passing body and the context is dropped either way.

php
// testo.php
new SuiteConfig(
    name: 'Unit',
    location: ['tests'],
    plugins: [new UnderstudyPlugin()],
);

With strictStubs: true a stub that was never called fails its test too.

Constructor

php
__construct(
    bool $strictStubs = false,
)
ParameterTypeDefaultDescription
$strictStubsboolfalse

Methods

configure()

php
configure(Internal\Container\Container $container): void