WireTests::check()

Assert that $expectValue and $actualValue satisfy $operator, output ok() on pass or throw on fail

Supported operators: , !==, ==, !=, <, <=, >, >= String operators (actual vs. expected): *= (contains), ^= (starts with), $= (ends with)

Usage

// basic usage
$wireTests->check(string $testName, mixed $expectValue, mixed $actualValue);

// usage with all arguments
$wireTests->check(string $testName, mixed $expectValue, mixed $actualValue, string $operator = '===');

Arguments

NameType(s)Description
$testNamestring
$expectValuemixed
$actualValuemixed
$operator (optional)string

Exceptions

Method can throw exceptions on error:

  • WireTestException


WireTests methods and properties

API reference based on ProcessWire core version 3.0.269