\PHPUnit_Util_Test

Test helpers.

Synopsis

class PHPUnit_Util_Test {
  • // constants
  • const REGEX_DATA_PROVIDER = '/@dataProvider\s+([a-zA-Z0-9._:-\\\\x7f-\xff]+)/';
  • const REGEX_EXPECTED_EXCEPTION = '(@expectedException\s+([:.\w\\\\x7f-\xff]+)(?:[\t ]+(\S*))?(?:[\t ]+(\S*))?\s*$)m';
  • const REGEX_REQUIRES_VERSION = '/@requires\s+(?P<name>PHP(?:Unit)?)\s+(?P<value>[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m';
  • const REGEX_REQUIRES_OS = '/@requires\s+OS\s+(?P<value>.+?)[ \t]*\r?$/m';
  • const REGEX_REQUIRES = '/@requires\s+(?P<name>function|extension)\s+(?P<value>([^ ]+?))[ \t]*\r?$/m';
  • const SMALL = 0;
  • const MEDIUM = 1;
  • const LARGE = 2;
}

Violations

PHPMessDetector

Line Rule Message
78 - 80 UnusedPrivateField Avoid unused private fields such as '$templateMethods'.
255 - 297 CyclomaticComplexity The method getMissingRequirements() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
255 - 297 NPathComplexity The method getMissingRequirements() has an NPath complexity of 864. The configured NPath complexity threshold is 200.
307 - 358 CyclomaticComplexity The method getExpectedException() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
392 - 451 CyclomaticComplexity The method getProvidedData() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10.
392 - 451 NPathComplexity The method getProvidedData() has an NPath complexity of 255. The configured NPath complexity threshold is 200.
585 - 625 CyclomaticComplexity The method getGroups() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
728 - 766 CyclomaticComplexity The method getHookMethods() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.
823 - 930 CyclomaticComplexity The method resolveElementToReflectionObjects() has a Cyclomatic Complexity of 29. The configured cyclomatic complexity threshold is 10.
823 - 930 ExcessiveMethodLength The method resolveElementToReflectionObjects() has 108 lines of code. Current threshold is set to 100. Avoid really long methods.

Constants

Name Value
REGEX_DATA_PROVIDER '/@dataProvider\s+([a-zA-Z0-9._:-\\\\x7f-\xff]+)/'
REGEX_EXPECTED_EXCEPTION '(@expectedException\s+([:.\w\\\\x7f-\xff]+)(?:[\t ]+(\S*))?(?:[\t ]+(\S*))?\s*$)m'
REGEX_REQUIRES_VERSION '/@requires\s+(?P<name>PHP(?:Unit)?)\s+(?P<value>[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m'
REGEX_REQUIRES_OS '/@requires\s+OS\s+(?P<value>.+?)[ \t]*\r?$/m'
REGEX_REQUIRES '/@requires\s+(?P<name>function|extension)\s+(?P<value>([^ ]+?))[ \t]*\r?$/m'
SMALL 0
MEDIUM 1
LARGE 2

Members

private

  • $annotationCache
  • $hookMethods
  • $templateMethods

Methods

private

public

History