A

AnsiClass in namespace Tester

ANSI escape sequences for terminal colors, cursor control, and text formatting.

AssertClass in namespace Tester

Provides assertion methods for verifying values in tests.

AssertExceptionClass in namespace Tester

Carries assertion failure details including the actual and expected values.

$ AssertException#actualProperty in class AssertException
AbstractGeneratorClass in namespace Tester\CodeCoverage\Generators

Base class for code coverage report generators.

$ AbstractGenerator#acceptFilesProperty in class AbstractGenerator
Expect::and() — Method in class Expect
Expect::andSame() — Method in class Expect
Expect::andNotSame() — Method in class Expect
Expect::andEqual() — Method in class Expect
Expect::andNotEqual() — Method in class Expect
Expect::andContains() — Method in class Expect
Expect::andNotContains() — Method in class Expect
Expect::andTrue() — Method in class Expect
Expect::andFalse() — Method in class Expect
Expect::andNull() — Method in class Expect
Expect::andNan() — Method in class Expect
Expect::andTruthy() — Method in class Expect
Expect::andFalsey() — Method in class Expect
Expect::andCount() — Method in class Expect
Expect::andType() — Method in class Expect
Expect::andMatch() — Method in class Expect
Expect::andMatchFile() — Method in class Expect
FileMutator::addMutator() — Method in class FileMutator
Runner::addPhpIniOption() — Method in class Runner
Runner::addJob() — Method in class Runner

Appends new job to queue.

TestHandler::assess() — Method in class TestHandler

B

Ansi::boldOn() — Method in class Ansi

Returns ANSI sequence to turn on bold text.

Ansi::boldOff() — Method in class Ansi

Returns ANSI sequence to turn off bold text.

Environment::bypassFinals() — Method in class Environment

Strips the final keyword from PHP source files on load, allowing subclassing of final classes.

OutputHandler::begin() — Method in class OutputHandler
ConsolePrinter::begin() — Method in class ConsolePrinter
JUnitPrinter::begin() — Method in class JUnitPrinter
Logger::begin() — Method in class Logger
TapPrinter::begin() — Method in class TapPrinter

C

Ansi::color() — Method in class Ansi

Returns ANSI escape sequence for given color.

Ansi::colorize() — Method in class Ansi

Wraps text with ANSI color sequence and color reset.

Ansi::clearLine() — Method in class Ansi

Returns ANSI sequence to clear from cursor to end of line.

$ Assert#counterProperty in class Assert
Assert::contains() — Method in class Assert

Asserts that a string contains a substring, or an array contains an element (strict).

Assert::count() — Method in class Assert

Asserts that an array or Countable has the expected number of items.

CollectorClass in namespace Tester\CodeCoverage

Collects code coverage data from a test process and merges it into a shared file.

$ AbstractGenerator#coveredSumProperty in class AbstractGenerator
CloverXMLGeneratorClass in namespace Tester\CodeCoverage\Generators
DomQuery::closest() — Method in class DomQuery

Returns closest ancestor matching CSS selector.

DomQuery::css2xpath() — Method in class DomQuery

Converts a CSS selector into an XPath expression.

Dumper::color() — Method in class Dumper
$ Environment#checkAssertionsProperty in class Environment
Expect::contains() — Method in class Expect
Expect::count() — Method in class Expect
$ FileMock#contextProperty in class FileMock
FileMock::create() — Method in class FileMock

Creates an in-memory virtual file with the given content and returns its mock:// URL.

$ FileMutator#contextProperty in class FileMutator
CliTesterClass in namespace Tester\Runner

Parses CLI options, configures the runner, and executes the test suite.

CommandLineClass in namespace Tester\Runner

Command-line arguments parser.

CommandLine::checkArg() — Method in class CommandLine
ConsolePrinterClass in namespace Tester\Runner\Output

Prints test progress and results to the console in dots, lines, or cider mode.

D

Collector::detectEngines() — Method in class Collector
$ AbstractGenerator#dataProperty in class AbstractGenerator
DataProviderClass in namespace Tester

Loads and filters test data from PHP or INI files.

DomQueryClass in namespace Tester

Simplifies querying and traversing HTML documents using CSS selectors.

DumperClass in namespace Tester

Dumps PHP variables.

$ Dumper#dumpDirProperty in class Dumper
Dumper::dumpException() — Method in class Dumper

Formats an exception with its message, trace, and diff command into a human-readable string.

Expect::dump() — Method in class Expect
FileMutator::dir_closedir() — Method in class FileMutator
FileMutator::dir_opendir() — Method in class FileMutator
FileMutator::dir_readdir() — Method in class FileMutator
FileMutator::dir_rewinddir() — Method in class FileMutator
HttpAssert::denyCode() — Method in class HttpAssert

Asserts that the HTTP response code does not match the expectation.

HttpAssert::denyHeader() — Method in class HttpAssert

Asserts that a response header does not exist or does not match the expectation.

HttpAssert::denyBody() — Method in class HttpAssert

Asserts that the response body does not match the expectation.

E

$ Assert#expandPatternsProperty in class Assert

expand patterns in match() and matchFile()

Assert::equal() — Method in class Assert

Asserts that two values are equal, ignoring object identity, array key order, and tiny float differences by default.

Assert::exception() — Method in class Assert
Assert::error() — Method in class Assert
Assert::expandMatchingPatterns() — Method in class Assert
$ AssertException#expectedProperty in class AssertException
EnvironmentClass in namespace Tester

Testing environment.

Environment::exit() — Method in class Environment
ExpectClass in namespace Tester

Builds a chain of Assert constraints to use inside Assert::equal() for partial value matching.

Expect::equal() — Method in class Expect
Helpers::errorTypeToString() — Method in class Helpers
Helpers::escapeArg() — Method in class Helpers

Escapes a string for safe use as a shell argument.

HttpAssert::expectCode() — Method in class HttpAssert

Asserts that the HTTP response code matches the expectation.

HttpAssert::expectHeader() — Method in class HttpAssert

Asserts that a response header exists and optionally matches the expectation.

HttpAssert::expectBody() — Method in class HttpAssert

Asserts that the response body matches the expectation.

OutputHandler::end() — Method in class OutputHandler
ConsolePrinter::end() — Method in class ConsolePrinter
JUnitPrinter::end() — Method in class JUnitPrinter
Logger::end() — Method in class Logger
TapPrinter::end() — Method in class TapPrinter

F

Assert::false() — Method in class Assert

Asserts that a value is strictly false (=== false).

Assert::falsey() — Method in class Assert

Asserts that a value is falsy (empty string, 0, null, false, empty array).

Assert::fail() — Method in class Assert

Throws AssertException with given message, triggering any registered onFailure handler.

Collector::flush() — Method in class Collector

Writes collected coverage to file and resets the oplog. Only effective with the PHPDBG engine.

DomQuery::fromHtml() — Method in class DomQuery

Creates a DomQuery object from an HTML string.

DomQuery::fromXml() — Method in class DomQuery

Creates a DomQuery object from an XML string.

DomQuery::find() — Method in class DomQuery

Returns array of elements matching CSS selector.

Expect::false() — Method in class Expect
Expect::falsey() — Method in class Expect
FileMockClass in namespace Tester

In-memory stream wrapper for testing file operations without touching the filesystem.

$ FileMock#filesProperty in class FileMock
FileMutatorClass in namespace Tester

PHP file mutator.

Helpers::findCommonDirectory() — Method in class Helpers

Finds the common ancestor directory of the given paths. All paths must exist.

HttpAssert::fetch() — Method in class HttpAssert

Sends an HTTP request and returns an HttpAssert instance for chaining assertions.

OutputHandler::finish() — Method in class OutputHandler
ConsolePrinter::finish() — Method in class ConsolePrinter
JUnitPrinter::finish() — Method in class JUnitPrinter
Logger::finish() — Method in class Logger
TapPrinter::finish() — Method in class TapPrinter
Runner::finishTest() — Method in class Runner

Notifies all output handlers that a test has finished, updates the result cache, and stops on failure if configured.

G

AbstractGenerator::getCoveredPercent() — Method in class AbstractGenerator
AbstractGenerator::getSourceIterator() — Method in class AbstractGenerator
AbstractGenerator::getCommonFilesPath() — Method in class AbstractGenerator
Environment::getTestAnnotations() — Method in class Environment

Returns annotations from the top-level test file's docblock.

Job::getEnvironmentVariable() — Method in class Job
Job::getTest() — Method in class Job
Job::getExitCode() — Method in class Job

Returns exit code.

Job::getHeaders() — Method in class Job

Returns output headers.

Job::getDuration() — Method in class Job

Returns process duration in seconds.

PhpInterpreter::getCommandLine() — Method in class PhpInterpreter
PhpInterpreter::getCommand() — Method in class PhpInterpreter
PhpInterpreter::getVersion() — Method in class PhpInterpreter
PhpInterpreter::getCodeCoverageEngines() — Method in class PhpInterpreter
PhpInterpreter::getStartupError() — Method in class PhpInterpreter
PhpInterpreter::getShortInfo() — Method in class PhpInterpreter
Runner::getEnvironmentVariables() — Method in class Runner
Runner::getInterpreter() — Method in class Runner
Test::getFile() — Method in class Test
Test::getArguments() — Method in class Test
Test::getSignature() — Method in class Test
Test::getResult() — Method in class Test
Test::getDuration() — Method in class Test

Duration in seconds.

Test::getOutput() — Method in class Test

Returns combined stdout and stderr output.

TestCase::getData() — Method in class TestCase

H

Ansi::hideCursor() — Method in class Ansi

Returns ANSI sequence to hide the cursor.

Assert::hasKey() — Method in class Assert

Asserts that an array has the given key.

Assert::hasNotKey() — Method in class Assert

Asserts that an array does not have the given key.

HtmlGeneratorClass in namespace Tester\CodeCoverage\Generators

Code coverage report generator.

DomQuery::has() — Method in class DomQuery

Checks if any descendant matches CSS selector.

Environment::handleException() — Method in class Environment
HelpersClass in namespace Tester

Utility methods for file I/O, path handling, annotation parsing, and shell escaping.

HttpAssertClass in namespace Tester

HTTP testing helpers.

CommandLine::help() — Method in class CommandLine
PhpInterpreter::hasExtension() — Method in class PhpInterpreter
Test::hasResult() — Method in class Test

I

Assert::isMatching() — Method in class Assert

Compares using mask.

Collector::isStarted() — Method in class Collector
CommandLine::isEmpty() — Method in class CommandLine
InterruptExceptionClass in namespace Tester\Runner

Signals that the test run was interrupted by the user (e.g. Ctrl+C).

Job::isRunning() — Method in class Job

Checks if the test is still running.

PhpInterpreter::isCgi() — Method in class PhpInterpreter
$ Runner#ignoreDirsProperty in class Runner
TestHandler::initiate() — Method in class TestHandler

J

JobClass in namespace Tester\Runner

Spawns an isolated PHP process for a single test and captures its output and exit code.

JUnitPrinterClass in namespace Tester\Runner\Output

Outputs test results in JUnit XML format.

L

DataProvider::load() — Method in class DataProvider

Loads data sets from a PHP or INI file, optionally filtered by a query string.

Environment::lock() — Method in class Environment

Prevents two parallel tests with the same name from running at the same time.

Environment::loadData() — Method in class Environment

Returns the current data set passed via @dataProvider annotation or --dataprovider CLI argument.

LoggerClass in namespace Tester\Runner\Output

Logs all test results including passed tests to a file or stdout.

M

Assert::match() — Method in class Assert

Asserts that a string matches a given pattern.

Assert::matchFile() — Method in class Assert

Asserts that a string matches a pattern loaded from a file.

DomQuery::matches() — Method in class DomQuery

Checks if element matches CSS selector.

$ Dumper#maxLengthProperty in class Dumper
$ Dumper#maxDepthProperty in class Dumper
$ Dumper#maxPathSegmentsProperty in class Dumper
Expect::match() — Method in class Expect
Expect::matchFile() — Method in class Expect
FileMutator::mkdir() — Method in class FileMutator
$ Test#messageProperty in class Test

N

Assert::notSame() — Method in class Assert

Asserts that two values are not identical (!==).

Assert::notEqual() — Method in class Assert

Asserts that two values are not equal (same loose comparison rules as equal()).

Assert::notContains() — Method in class Assert

Asserts that a string does not contain a substring, or an array does not contain an element (strict).

Assert::null() — Method in class Assert

Asserts that a value is strictly null (=== null).

Assert::notNull() — Method in class Assert

Asserts that a value is not null (!== null).

Assert::nan() — Method in class Assert

Asserts that a value is NAN. Use only this method for NAN checks, as NAN !== NAN.

Assert::noError() — Method in class Assert
Assert::notMatch() — Method in class Assert

Asserts that a string does not match a given pattern.

Expect::notSame() — Method in class Expect
Expect::notEqual() — Method in class Expect
Expect::notContains() — Method in class Expect
Expect::null() — Method in class Expect
Expect::nan() — Method in class Expect

O

$ Assert#onFailureProperty in class Assert
$ AssertException#origMessageProperty in class AssertException
$ AssertException#outputNameProperty in class AssertException
OutputHandlerClass in namespace Tester\Runner

Receives test lifecycle events from the runner to produce output.

$ Runner#outputHandlersProperty in class Runner

P

$ Assert#patternsProperty in class Assert
PhpParserClass in namespace Tester\CodeCoverage

Parses PHP source code and returns:

  • the start/end line information about functions, classes, interfaces, traits and their methods
  • the count of code lines
  • the count of commented code lines
PhpParser::parse() — Method in class PhpParser

Returned structure is: stdClass { linesOfCode: int, linesOfComments: int, functions: [functionName => $functionInfo], classes: [className => $info], traits: [traitName => $info], interfaces: [interfaceName => $info], }

DataProvider::parseAnnotation() — Method in class DataProvider

Parses a @dataProvider annotation value into its file path, query, and optional flag.

$ Dumper#pathSeparatorProperty in class Dumper
Environment::print() — Method in class Environment
Helpers::purge() — Method in class Helpers

Creates directory if it does not exist and deletes all its contents.

Helpers::parseDocComment() — Method in class Helpers

Parses the first docblock in a string into an array of annotation values.

Helpers::prepareTempDir() — Method in class Helpers
CommandLine::parse() — Method in class CommandLine
OutputHandler::prepare() — Method in class OutputHandler
ConsolePrinter::prepare() — Method in class ConsolePrinter
JUnitPrinter::prepare() — Method in class JUnitPrinter
Logger::prepare() — Method in class Logger
TapPrinter::prepare() — Method in class TapPrinter
PhpInterpreterClass in namespace Tester\Runner

Wraps a PHP executable and its resolved version, extensions, and command-line options.

$ Runner#pathsProperty in class Runner
Runner::prepareTest() — Method in class Runner

R

Ansi::reset() — Method in class Ansi

Returns ANSI sequence to reset all attributes.

AbstractGenerator::render() — Method in class AbstractGenerator
AbstractGenerator::renderSelf() — Method in class AbstractGenerator
CloverXMLGenerator::renderSelf() — Method in class CloverXMLGenerator
HtmlGenerator::renderSelf() — Method in class HtmlGenerator
Dumper::removeColors() — Method in class Dumper
FileMock::register() — Method in class FileMock
FileMutator::rename() — Method in class FileMutator
FileMutator::rmdir() — Method in class FileMutator
Helpers::readFile() — Method in class Helpers

Reads entire file into a string.

CliTester::run() — Method in class CliTester
Job::run() — Method in class Job

Runs single test.

RunnerClass in namespace Tester\Runner

Discovers tests, schedules parallel jobs, and aggregates results.

Runner::run() — Method in class Runner

Runs all tests.

TestCase::run() — Method in class TestCase

Runs all test methods in this test case or a specific test method if provided.

TestCase::runTest() — Method in class TestCase

Runs a single test method, resolving data providers and handling errors.

S

Ansi::showCursor() — Method in class Ansi

Returns ANSI sequence to show the cursor.

Ansi::stripAnsi() — Method in class Ansi

Removes all ANSI escape sequences from string (colors, cursor control, etc.).

Assert::same() — Method in class Assert

Asserts that two values are identical (===).

AssertException::setMessage() — Method in class AssertException
Collector::start() — Method in class Collector

Starts gathering the information for code coverage.

Collector::save() — Method in class Collector

Merges the current coverage data into the shared coverage file using an exclusive lock.

$ AbstractGenerator#sourcesProperty in class AbstractGenerator
Dumper::saveOutput() — Method in class Dumper

Saves assertion dump to the output directory (configured by $dumpDir).

Environment::setup() — Method in class Environment

Sets up error handling, colors, code coverage, and assertion tracking for the test process.

Environment::setupColors() — Method in class Environment

Detects whether ANSI colors should be used and wraps output buffer to strip them when not.

Environment::setupErrors() — Method in class Environment

Sets error_reporting, exception handler, and shutdown handler for clean test output.

Environment::setupFunctions() — Method in class Environment

Creates global functions test(), testException(), setUp() and tearDown().

Environment::skip() — Method in class Environment

Skips this test.

Expect::same() — Method in class Expect
FileMock::stream_open() — Method in class FileMock
FileMock::stream_read() — Method in class FileMock
FileMock::stream_write() — Method in class FileMock
FileMock::stream_tell() — Method in class FileMock
FileMock::stream_eof() — Method in class FileMock
FileMock::stream_seek() — Method in class FileMock
FileMock::stream_truncate() — Method in class FileMock
FileMock::stream_set_option() — Method in class FileMock
FileMock::stream_stat() — Method in class FileMock
FileMock::stream_lock() — Method in class FileMock
FileMock::stream_metadata() — Method in class FileMock
FileMutator::stream_cast() — Method in class FileMutator
FileMutator::stream_close() — Method in class FileMutator
FileMutator::stream_eof() — Method in class FileMutator
FileMutator::stream_flush() — Method in class FileMutator
FileMutator::stream_lock() — Method in class FileMutator
FileMutator::stream_metadata() — Method in class FileMutator
FileMutator::stream_open() — Method in class FileMutator
FileMutator::stream_read() — Method in class FileMutator
FileMutator::stream_seek() — Method in class FileMutator
FileMutator::stream_set_option() — Method in class FileMutator
FileMutator::stream_stat() — Method in class FileMutator
FileMutator::stream_tell() — Method in class FileMutator
FileMutator::stream_truncate() — Method in class FileMutator
FileMutator::stream_write() — Method in class FileMutator
Job::setTempDirectory() — Method in class Job
Job::setEnvironmentVariable() — Method in class Job
$ Runner#stopOnFailProperty in class Runner
Runner::setEnvironmentVariable() — Method in class Runner
Runner::setTempDirectory() — Method in class Runner
$ Test#stdoutProperty in class Test
$ Test#stderrProperty in class Test
TestHandler::setTempDirectory() — Method in class TestHandler
TestCase::setUp() — Method in class TestCase

Setup logic to be executed before each test method. Override in subclasses for specific behaviors.

TestCase::skip() — Method in class TestCase

Skips the current test with an optional reason message.

T

Ansi::textWidth() — Method in class Ansi

Returns display width of string (number of terminal columns).

Assert::true() — Method in class Assert

Asserts that a value is strictly true (=== true).

Assert::truthy() — Method in class Assert

Asserts that a value is truthy (non-empty, non-zero, non-null, non-false).

Assert::type() — Method in class Assert

Asserts that a value is of the given built-in type, class, or interface.

Assert::throws() — Method in class Assert
$ AbstractGenerator#totalSumProperty in class AbstractGenerator
DataProvider::testQuery() — Method in class DataProvider

Checks whether a data-set key matches the query filter criteria.

Dumper::toLine() — Method in class Dumper

Converts a variable to a compact single-line string representation.

Dumper::toPhp() — Method in class Dumper

Converts a variable to a pretty-printed PHP representation.

Expect::that() — Method in class Expect
Expect::true() — Method in class Expect
Expect::truthy() — Method in class Expect
Expect::type() — Method in class Expect
TapPrinterClass in namespace Tester\Runner\Output

Outputs test results in Test Anything Protocol format (http://testanything.org).

$ Runner#threadCountProperty in class Runner
$ Runner#testHandlerProperty in class Runner
TestClass in namespace Tester\Runner

Immutable value object representing a single test and its execution result.

$ Test#titleProperty in class Test
TestHandlerClass in namespace Tester\Runner

Processes test annotations to initiate test variants and assess their results.

TestCaseClass in namespace Tester

Base class for xUnit-style test cases with setUp/tearDown hooks and data provider support.

TestCase::tearDown() — Method in class TestCase

Teardown logic to be executed after each test method. Override in subclasses to release resources.

TestCaseExceptionClass in namespace Tester

Signals a TestCase configuration or runtime error.

TestCaseSkippedExceptionClass in namespace Tester

Signals that a test method was skipped.

U

$ Environment#useColorsProperty in class Environment
FileMock::url_stat() — Method in class FileMock
FileMock::unlink() — Method in class FileMock
FileMutator::unlink() — Method in class FileMutator
FileMutator::url_stat() — Method in class FileMutator

W

Assert::with() — Method in class Assert
Job::waitForActivity() — Method in class Job

Waits for activity on any of the running jobs.

PhpInterpreter::withArguments() — Method in class PhpInterpreter

Returns a new instance with additional command-line arguments appended.

PhpInterpreter::withPhpIniOption() — Method in class PhpInterpreter

Returns a new instance with a -d INI option appended to the command line.

Test::withTitle() — Method in class Test
Test::withArguments() — Method in class Test
Test::withResult() — Method in class Test

_

AssertException::__construct() — Method in class AssertException
AbstractGenerator::__construct() — Method in class AbstractGenerator
CloverXMLGenerator::__construct() — Method in class CloverXMLGenerator
HtmlGenerator::__construct() — Method in class HtmlGenerator
Expect::__callStatic() — Method in class Expect
Expect::__call() — Method in class Expect
Expect::__invoke() — Method in class Expect

Checks the expectations.

CommandLine::__construct() — Method in class CommandLine
Job::__construct() — Method in class Job
ConsolePrinter::__construct() — Method in class ConsolePrinter
JUnitPrinter::__construct() — Method in class JUnitPrinter
Logger::__construct() — Method in class Logger
TapPrinter::__construct() — Method in class TapPrinter
PhpInterpreter::__construct() — Method in class PhpInterpreter
Runner::__construct() — Method in class Runner
Test::__construct() — Method in class Test
TestHandler::__construct() — Method in class TestHandler