class PHPUnit_Util_Configuration (View source)

Wrapper for the PHPUnit XML configuration file.

Example XML configuration file:

/path/to/files /path/to/MyTest.php /path/to/files/exclude

name name

name name

/path/to/files /path/to/file /path/to/files /path/to/file

Sebastian 22 April 19.78 MyRelativeFile.php MyRelativeDir

.

Properties

protected $document
protected $xpath
protected $filename

Methods

__construct(string $filename)

Loads a PHPUnit configuration file.

getInstance(string $filename)

Returns a PHPUnit configuration object.

string
getFilename()

Returns the realpath to the configuration file.

array
getFilterConfiguration()

Returns the configuration for SUT filtering.

array
getGroupConfiguration()

Returns the configuration for groups.

array
getTestdoxGroupConfiguration()

Returns the configuration for testdox groups.

array
getListenerConfiguration()

Returns the configuration for listeners.

array
getLoggingConfiguration()

Returns the logging configuration.

array
getPHPConfiguration()

Returns the PHP configuration.

handlePHPConfiguration()

Handles the PHP configuration.

array
getPHPUnitConfiguration()

Returns the PHPUnit configuration.

getTestSuiteConfiguration($testSuiteFilter = null)

Returns the test suite configuration.

array
getTestSuiteNames()

Returns the test suite names from the configuration.

getTestSuite(DOMElement $testSuiteNode, $testSuiteFilter = null)

No description

bool
getBoolean(string $value, bool $default)

No description

bool
getInteger(string $value, bool $default)

No description

array
readFilterDirectories(string $query)

No description

array
readFilterFiles(string $query)

No description

string
toAbsolutePath(string $path, bool $useIncludePath = false)

No description

Details

protected __construct(string $filename)

Loads a PHPUnit configuration file.

Parameters

string $filename

static PHPUnit_Util_Configuration getInstance(string $filename)

Returns a PHPUnit configuration object.

Parameters

string $filename

Return Value

PHPUnit_Util_Configuration

string getFilename()

Returns the realpath to the configuration file.

Return Value

string

array getFilterConfiguration()

Returns the configuration for SUT filtering.

Return Value

array

array getGroupConfiguration()

Returns the configuration for groups.

Return Value

array

array getTestdoxGroupConfiguration()

Returns the configuration for testdox groups.

Return Value

array

array getListenerConfiguration()

Returns the configuration for listeners.

Return Value

array

array getLoggingConfiguration()

Returns the logging configuration.

Return Value

array

array getPHPConfiguration()

Returns the PHP configuration.

Return Value

array

handlePHPConfiguration()

Handles the PHP configuration.

array getPHPUnitConfiguration()

Returns the PHPUnit configuration.

Return Value

array

PHPUnit_Framework_TestSuite getTestSuiteConfiguration($testSuiteFilter = null)

Returns the test suite configuration.

Parameters

$testSuiteFilter

Return Value

PHPUnit_Framework_TestSuite

array getTestSuiteNames()

Returns the test suite names from the configuration.

Return Value

array

protected PHPUnit_Framework_TestSuite getTestSuite(DOMElement $testSuiteNode, $testSuiteFilter = null)

Parameters

DOMElement $testSuiteNode
$testSuiteFilter

Return Value

PHPUnit_Framework_TestSuite

protected bool getBoolean(string $value, bool $default)

Parameters

string $value
bool $default

Return Value

bool

protected bool getInteger(string $value, bool $default)

Parameters

string $value
bool $default

Return Value

bool

protected array readFilterDirectories(string $query)

Parameters

string $query

Return Value

array

protected array readFilterFiles(string $query)

Parameters

string $query

Return Value

array

protected string toAbsolutePath(string $path, bool $useIncludePath = false)

Parameters

string $path
bool $useIncludePath

Return Value

string