A

Ansi — Class in namespace Tester

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

Assert — Class in namespace Tester

Provides assertion methods for verifying values in tests.

AssertException — Class in namespace Tester

Carries assertion failure details including the actual and expected values.

$ AssertException#actual — Property in class AssertException
AbstractGenerator — Class in namespace Tester\CodeCoverage\Generators

Base class for code coverage report generators.

$ AbstractGenerator#acceptFiles — Property 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::cursorMove() — Method in class Ansi

Returns ANSI sequence to move the cursor by the given number of columns (x) and rows (y).

Ansi::clearLine() — Method in class Ansi

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

$ Assert#counter — Property 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.

Collector — Class in namespace Tester\CodeCoverage

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

$ AbstractGenerator#coveredSum — Property in class AbstractGenerator
CloverXMLGenerator — Class 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#checkAssertions — Property in class Environment
Expect::contains() — Method in class Expect
Expect::count() — Method in class Expect
$ FileMock#context — Property 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#context — Property in class FileMutator
CliTester — Class in namespace Tester\Runner

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

CommandLine — Class in namespace Tester\Runner

Command-line arguments parser.

CommandLine::checkArg() — Method in class CommandLine
ConsolePrinter — Class 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#data — Property in class AbstractGenerator
DataProvider — Class in namespace Tester

Loads and filters test data from PHP or INI files.

DomQuery — Class in namespace Tester

Simplifies querying and traversing HTML documents using CSS selectors.

Dumper — Class in namespace Tester

Dumps PHP variables.

$ Dumper#dumpDir — Property 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#expandPatterns — Property 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#expected — Property in class AssertException
Environment — Class in namespace Tester

Testing environment.

Environment::exit() — Method in class Environment
Expect — Class 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
FileMock — Class in namespace Tester

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

$ FileMock#files — Property in class FileMock
FileMutator — Class 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
Runner::getJobCount() — Method in class Runner
Runner::getFinishedCount() — 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.

HtmlGenerator — Class 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
Helpers — Class in namespace Tester

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

HttpAssert — Class 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
InterruptException — Class 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#ignoreDirs — Property in class Runner
TestHandler::initiate() — Method in class TestHandler

J

Job — Class in namespace Tester\Runner

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

OutputHandler::jobStarted() — Method in class OutputHandler

called when a job starts running

ConsolePrinter::jobStarted() — Method in class ConsolePrinter

called when a job starts running

JUnitPrinter — Class 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.

Logger — Class 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#maxLength — Property in class Dumper
$ Dumper#maxDepth — Property in class Dumper
$ Dumper#maxPathSegments — Property in class Dumper
Expect::match() — Method in class Expect
Expect::matchFile() — Method in class Expect
FileMutator::mkdir() — Method in class FileMutator
$ Test#message — Property 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#onFailure — Property in class Assert
$ AssertException#origMessage — Property in class AssertException
$ AssertException#outputName — Property in class AssertException
OutputHandler — Class in namespace Tester\Runner

Receives test lifecycle events from the runner to produce output.

$ Runner#outputHandlers — Property in class Runner

P

Ansi::pad() — Method in class Ansi

Pads text to specified display width.

$ Assert#patterns — Property in class Assert
PhpParser — Class 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#pathSeparator — Property 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
PhpInterpreter — Class in namespace Tester\Runner

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

$ Runner#paths — Property 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.

Runner — Class 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#sources — Property 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#stopOnFail — Property in class Runner
Runner::setEnvironmentVariable() — Method in class Runner
Runner::setTempDirectory() — Method in class Runner
$ Test#stdout — Property in class Test
$ Test#stderr — Property 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).

Ansi::truncate() — Method in class Ansi

Truncates text to max display width, adding ellipsis if needed.

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#totalSum — Property 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
OutputHandler::tick() — Method in class OutputHandler

called periodically during test execution

ConsolePrinter::tick() — Method in class ConsolePrinter
TapPrinter — Class in namespace Tester\Runner\Output

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

$ Runner#threadCount — Property in class Runner
$ Runner#testHandler — Property in class Runner
Test — Class in namespace Tester\Runner

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

$ Test#title — Property in class Test
TestHandler — Class in namespace Tester\Runner

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

TestCase — Class 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.

TestCaseException — Class in namespace Tester

Signals a TestCase configuration or runtime error.

TestCaseSkippedException — Class in namespace Tester

Signals that a test method was skipped.

U

$ Environment#useColors — Property 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