yxorP Documentation

UnifiedTestCase
in package
implements IteratorAggregate

Unified test case model class.

This model corresponds to a single test case (i.e. element in "tests" array) within a JSON object conforming to the unified test format's JSON schema. This test case may be executed by UnifiedTestRunner::run().

Tags
see
https://github.com/mongodb/specifications/blob/master/source/unified-test-format/unified-test-format.rst

Interfaces, Classes, Traits and Enums

IteratorAggregate

Table of Contents

$createEntities  : array<string|int, mixed>|null
$initialData  : array<string|int, mixed>|null
$runOnRequirements  : array<string|int, mixed>|null
$schemaVersion  : string
$test  : stdClass
fromFile()  : Generator
Yields UnifiedTestCase objects for a JSON file.
fromJSON()  : Generator
Yields UnifiedTestCase objects for parsed JSON.
getIterator()  : Traversable
Return this object as arguments for UnifiedTestRunner::doTestCase().
__construct()  : mixed

Properties

$createEntities

private array<string|int, mixed>|null $createEntities

$runOnRequirements

private array<string|int, mixed>|null $runOnRequirements

Methods

fromFile()

Yields UnifiedTestCase objects for a JSON file.

public static fromFile(string $filename) : Generator
Parameters
$filename : string
Return values
Generator

fromJSON()

Yields UnifiedTestCase objects for parsed JSON.

public static fromJSON(stdClass $json) : Generator

The top-level and test-level "description" fields will be concatenated and used as the key for each yielded value.

Parameters
$json : stdClass
Return values
Generator

__construct()

private __construct(stdClass $test, string $schemaVersion[, array<string|int, mixed>|null $runOnRequirements = null ][, array<string|int, mixed>|null $createEntities = null ][, array<string|int, mixed>|null $initialData = null ]) : mixed
Parameters
$test : stdClass
$schemaVersion : string
$runOnRequirements : array<string|int, mixed>|null = null
$createEntities : array<string|int, mixed>|null = null
$initialData : array<string|int, mixed>|null = null
Return values
mixed

Search results