class PhptTestCase implements Test, SelfDescribing (View source)

Runner for PHPT test cases.

Methods

__construct(string $filename, AbstractPhpProcess $phpUtil = null)

Constructs a test case with the given filename.

int
count()

Counts the number of test cases executed by run(TestResult result).

run(TestResult $result = null)

Runs a test and collects its result in a TestResult instance.

string
getName()

Returns the name of the test case.

string
toString()

Returns a string representation of the test case.

array
parseIniSection(string $content)

Parse --INI-- section key value pairs and return as array.

array
parseEnvSection(string $content)

No description

Details

__construct(string $filename, AbstractPhpProcess $phpUtil = null)

Constructs a test case with the given filename.

Parameters

string $filename
AbstractPhpProcess $phpUtil

Exceptions

Exception

int count()

Counts the number of test cases executed by run(TestResult result).

Return Value

int

TestResult run(TestResult $result = null)

Runs a test and collects its result in a TestResult instance.

Parameters

TestResult $result

Return Value

TestResult

string getName()

Returns the name of the test case.

Return Value

string

string toString()

Returns a string representation of the test case.

Return Value

string

protected array parseIniSection(string $content)

Parse --INI-- section key value pairs and return as array.

Parameters

string $content

Return Value

array

protected array parseEnvSection(string $content)

Parameters

string $content

Return Value

array string>