CodeIgniter v4.5 API

Iterator
in package

Iterator for debugging.

Table of Contents

Properties

$results  : array<string|int, mixed>
Stores the results of each of the tests.
$tests  : array<string|int, mixed>
Stores the tests that we are to run.

Methods

add()  : $this
Adds a test to run.
getReport()  : string
Get results.
run()  : string|null
Runs through all of the tests that have been added, recording time to execute the desired number of iterations, and the approximate memory usage used during those iterations.

Properties

$results

Stores the results of each of the tests.

protected array<string|int, mixed> $results = []

$tests

Stores the tests that we are to run.

protected array<string|int, mixed> $tests = []

Methods

add()

Adds a test to run.

public add(string $name, callable(): mixed $closure) : $this

Tests are simply closures that the user can define any sequence of things to happen during the test.

Parameters
$name : string
$closure : callable(): mixed
Return values
$this

getReport()

Get results.

public getReport() : string
Return values
string

run()

Runs through all of the tests that have been added, recording time to execute the desired number of iterations, and the approximate memory usage used during those iterations.

public run([int $iterations = 1000 ][, bool $output = true ]) : string|null
Parameters
$iterations : int = 1000
$output : bool = true
Return values
string|null

        
On this page

Search results