TestManifestIterator
in package
implements
Iterator
TestManifestIterator reads a test manifest and returns the contained test definitions.
Tags
Table of Contents
Interfaces
- Iterator
Properties
- $directory : mixed
- The test directory.
- $key : mixed
- The current position.
- $manifest : mixed
- The test manifest.
- $numberTests : mixed
- The total number of tests.
- $url : mixed
- The URL of the test manifest.
Methods
- __construct() : mixed
- Constructor
- current() : array<string|int, mixed>
- Returns the current element.
- key() : string
- Returns the key of the current element.
- next() : mixed
- Moves forward to next element.
- rewind() : mixed
- Rewinds the TestManifestIterator to the first element.
- valid() : bool
- Checks if current position is valid.
Properties
$directory
The test directory.
private
mixed
$directory
$key
The current position.
private
mixed
$key
= 0
$manifest
The test manifest.
private
mixed
$manifest
$numberTests
The total number of tests.
private
mixed
$numberTests
= 0
$url
The URL of the test manifest.
private
mixed
$url
Methods
__construct()
Constructor
public
__construct(string $file, string $url) : mixed
Parameters
- $file : string
-
The manifest's filename.
- $url : string
-
The manifest's URL.
current()
Returns the current element.
public
current() : array<string|int, mixed>
Return values
array<string|int, mixed> —Returns an array containing the name of the test and the test definition object.
key()
Returns the key of the current element.
public
key() : string
Return values
string —The key of the current element
next()
Moves forward to next element.
public
next() : mixed
rewind()
Rewinds the TestManifestIterator to the first element.
public
rewind() : mixed
valid()
Checks if current position is valid.
public
valid() : bool
Return values
bool —True if the current position is valid; otherwise, false.