yxorP Documentation

ErrorExpectation
in package

Spec test operation error expectation.

Table of Contents

$code  : int
$codeName  : string
$codeNameMap  : array<string|int, mixed>
$excludedLabels  : array<string|int, string>
$includedLabels  : array<string|int, string>
$isExpected  : bool
$messageContains  : string
assert()  : void
Assert that the error expectation matches the actual outcome.
fromChangeStreams()  : mixed
fromClientSideEncryption()  : mixed
fromCrud()  : mixed
fromReadWriteConcern()  : mixed
fromRetryableReads()  : mixed
fromRetryableWrites()  : mixed
fromTransactions()  : mixed
isExpected()  : mixed
noError()  : mixed
__construct()  : mixed
assertCodeName()  : void
Assert that the error code name expectation matches the actual outcome.
fromGenericOperation()  : mixed
isArrayOfStrings()  : mixed

Properties

Methods

assert()

Assert that the error expectation matches the actual outcome.

public assert(TestCase $test[, Exception|null $actual = null ]) : void
Parameters
$test : TestCase

Test instance for performing assertions

$actual : Exception|null = null

Exception (if any) from the actual outcome

Return values
void

fromChangeStreams()

public static fromChangeStreams(stdClass $result) : mixed
Parameters
$result : stdClass
Return values
mixed

fromClientSideEncryption()

public static fromClientSideEncryption(stdClass $operation) : mixed
Parameters
$operation : stdClass
Return values
mixed

fromCrud()

public static fromCrud(stdClass $result) : mixed
Parameters
$result : stdClass
Return values
mixed

fromReadWriteConcern()

public static fromReadWriteConcern(stdClass $operation) : mixed
Parameters
$operation : stdClass
Return values
mixed

fromRetryableReads()

public static fromRetryableReads(stdClass $operation) : mixed
Parameters
$operation : stdClass
Return values
mixed

fromRetryableWrites()

public static fromRetryableWrites(stdClass $outcome) : mixed
Parameters
$outcome : stdClass
Return values
mixed

assertCodeName()

Assert that the error code name expectation matches the actual outcome.

private assertCodeName(TestCase $test[, Exception|null $actual = null ]) : void
Parameters
$test : TestCase

Test instance for performing assertions

$actual : Exception|null = null

Exception (if any) from the actual outcome

Return values
void

isArrayOfStrings()

private static isArrayOfStrings(mixed $array) : mixed
Parameters
$array : mixed
Return values
mixed

Search results