\PHPUnit_Util_Configuration

Wrapper for the PHPUnit XML configuration file.

Example XML configuration file:
<code>
<?xml version="1.0" encoding="utf-8" ?>

<phpunit backupGlobals="true"
backupStaticAttributes="false"
bootstrap="/path/to/bootstrap.php"
cacheTokens="false"
colors="false"
stderr="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
printerClass="PHPUnit_TextUI_ResultPrinter"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnRisky="false"
stopOnSkipped="false"
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
timeoutForSmallTests="1"
timeoutForMediumTests="10"
timeoutForLargeTests="60"
beStrictAboutTestsThatDoNotTestAnything="false"
beStrictAboutOutputDuringTests="false"
beStrictAboutTestSize="false"
beStrictAboutTodoAnnotatedTests="false"
checkForUnintentionallyCoveredCode="false"
verbose="false">
<testsuites>
<testsuite name="My Test Suite">
<directory suffix="Test.php" phpVersion="5.3.0" phpVersionOperator=">=">/path/to/files</directory>
<file phpVersion="5.3.0" phpVersionOperator=">=">/path/to/MyTest.php</file>
<exclude>/path/to/files/exclude</exclude>
</testsuite>
</testsuites>

<groups>
<include>
<group>name</group>
</include>
<exclude>
<group>name</group>
</exclude>
</groups>

<filter>
<blacklist>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
<exclude>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
</exclude>
</blacklist>
<whitelist addUncoveredFilesFromWhitelist="true"
processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
<exclude>
<directory suffix=".php">/path/to/files</directory>
<file>/path/to/file</file>
</exclude>
</whitelist>
</filter>

<listeners>
<listener class="MyListener" file="/optional/path/to/MyListener.php">
<arguments>
<array>
<element key="0">
<string>Sebastian</string>
</element>
</array>
<integer>22</integer>
<string>April</string>
<double>19.78</double>
<null/>
<object class="stdClass"/>
<file>MyRelativeFile.php</file>
<directory>MyRelativeDir</directory>
</arguments>
</listener>
</listeners>

<logging>
<log type="coverage-html" target="/tmp/report" lowUpperBound="50" highLowerBound="90"/>
<log type="coverage-clover" target="/tmp/clover.xml"/>
<log type="json" target="/tmp/logfile.json"/>
<log type="plain" target="/tmp/logfile.txt"/>
<log type="tap" target="/tmp/logfile.tap"/>
<log type="junit" target="/tmp/logfile.xml" logIncompleteSkipped="false"/>
<log type="testdox-html" target="/tmp/testdox.html"/>
<log type="testdox-text" target="/tmp/testdox.txt"/>
<log type="coverage-crap4j" target="/tmp/crap.xml"/>
</logging>

<php>
<includePath>.</includePath>
<ini name="foo" value="bar"/>
<const name="foo" value="bar"/>
<var name="foo" value="bar"/>
<env name="foo" value="bar"/>
<post name="foo" value="bar"/>
<get name="foo" value="bar"/>
<cookie name="foo" value="bar"/>
<server name="foo" value="bar"/>
<files name="foo" value="bar"/>
<request name="foo" value="bar"/>
</php>

<selenium>
<browser name="Firefox on Linux"
browser="*firefox /usr/lib/firefox/firefox-bin"
host="my.linux.box"
port="4444"
timeout="30000"/>
</selenium>
</phpunit>
</code>

Synopsis

class PHPUnit_Util_Configuration {
}

Violations

PHPMessDetector

Line Rule Message
351 - 389 CyclomaticComplexity The method getListenerConfiguration() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
396 - 444 CyclomaticComplexity The method getLoggingConfiguration() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
506 - 562 CyclomaticComplexity The method handlePHPConfiguration() has a Cyclomatic Complexity of 13. The configured cyclomatic complexity threshold is 10.
506 - 562 NPathComplexity The method handlePHPConfiguration() has an NPath complexity of 630. The configured NPath complexity threshold is 200.
570 - 772 CyclomaticComplexity The method getPHPUnitConfiguration() has a Cyclomatic Complexity of 32. The configured cyclomatic complexity threshold is 10.
570 - 772 NPathComplexity The method getPHPUnitConfiguration() has an NPath complexity of 2147483648. The configured NPath complexity threshold is 200.
570 - 772 ExcessiveMethodLength The method getPHPUnitConfiguration() has 203 lines of code. Current threshold is set to 100. Avoid really long methods.
858 - 969 CyclomaticComplexity The method getTestSuite() has a Cyclomatic Complexity of 21. The configured cyclomatic complexity threshold is 10.
858 - 969 NPathComplexity The method getTestSuite() has an NPath complexity of 112326. The configured NPath complexity threshold is 200.
858 - 969 ExcessiveMethodLength The method getTestSuite() has 112 lines of code. Current threshold is set to 100. Avoid really long methods.
1073 - 1109 CyclomaticComplexity The method toAbsolutePath() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.

Checkstyle

Line Column Severity Message
362 63 error Only one argument is allowed per line in a multi-line function call
577 62 error Only one argument is allowed per line in a multi-line function call
583 57 error Only one argument is allowed per line in a multi-line function call
592 56 error Only one argument is allowed per line in a multi-line function call
598 64 error Only one argument is allowed per line in a multi-line function call
604 73 error Only one argument is allowed per line in a multi-line function call
616 76 error Only one argument is allowed per line in a multi-line function call
622 77 error Only one argument is allowed per line in a multi-line function call
628 78 error Only one argument is allowed per line in a multi-line function call
634 72 error Only one argument is allowed per line in a multi-line function call
647 67 error Only one argument is allowed per line in a multi-line function call
653 62 error Only one argument is allowed per line in a multi-line function call
659 64 error Only one argument is allowed per line in a multi-line function call
665 67 error Only one argument is allowed per line in a multi-line function call
671 62 error Only one argument is allowed per line in a multi-line function call
677 64 error Only one argument is allowed per line in a multi-line function call
707 71 error Only one argument is allowed per line in a multi-line function call
713 72 error Only one argument is allowed per line in a multi-line function call
719 71 error Only one argument is allowed per line in a multi-line function call
725 90 error Only one argument is allowed per line in a multi-line function call
731 85 error Only one argument is allowed per line in a multi-line function call
737 81 error Only one argument is allowed per line in a multi-line function call
743 72 error Only one argument is allowed per line in a multi-line function call
749 82 error Only one argument is allowed per line in a multi-line function call
755 57 error Only one argument is allowed per line in a multi-line function call
767 58 error Only one argument is allowed per line in a multi-line function call
796 61 error Only one argument is allowed per line in a multi-line function call
804 64 error Only one argument is allowed per line in a multi-line function call

Members

private

  • $instances

protected

  • $document
  • $filename
  • $xpath

Methods

private

protected

public

History