- \PHPUnit_Util_Test
class (none) \ PHPUnit_Util_Test
Test helpers.
Method Summary
public static function describe(PHPUnit_Framework_Test $test, $asString = true)
- Parameters:
PHPUnit_Framework_Test
- $testboolean
- $asString- Defaults:
asString
=true
- Returns:
- mixed
private static function emptyHookMethodsArray()
- Returns:
- array
public static function getBackupSettings($className, $methodName)
Returns the backup settings for a test.
- Parameters:
string
- $methodName- Returns:
- array
private static function getBooleanAnnotationSetting($className, $methodName, $settingName)
- Parameters:
string
- $settingName- Returns:
- boolean
public static function getDependencies($className, $methodName)
Returns the dependencies for a test class or method.
- Parameters:
string
- $methodName- Returns:
- array
public static function getErrorHandlerSettings($className, $methodName)
Returns the error handler settings for a test.
- Parameters:
string
- $methodName- Returns:
- boolean
public static function getExpectedException($className, $methodName)
Returns the expected exception for a test.
- Parameters:
string
- $methodName- Returns:
- array
public static function getGroups($className, $methodName = "")
Returns the groups for a test class or method.
- Parameters:
string
- $methodName- Defaults:
methodName
=""
- Returns:
- array
public static function getHookMethods($className)
- Parameters:
string
- $className- Returns:
- array
public static function getLinesToBeCovered($className, $methodName)
- Parameters:
string
- $methodName- Returns:
- array|bool
- Throws:
- PHPUnit_Framework_CodeCoverageException
private static function getLinesToBeCoveredOrUsed($className, $methodName, $mode)
- Parameters:
string
- $mode- Returns:
- array
- Throws:
- PHPUnit_Framework_CodeCoverageException
public static function getLinesToBeUsed($className, $methodName)
Returns lines of code specified with the @uses annotation.
- Parameters:
string
- $methodName- Returns:
- array
public static function getMissingRequirements($className, $methodName)
Returns the missing requirements for a test.
- Parameters:
string
- $methodName- Returns:
- array
public static function getPreserveGlobalStateSettings($className, $methodName)
Returns the preserve global state settings for a test.
- Parameters:
string
- $methodName- Returns:
- boolean
public static function getProcessIsolationSettings($className, $methodName)
Returns the process isolation settings for a test.
- Parameters:
string
- $methodName- Returns:
- boolean
public static function getProvidedData($className, $methodName)
Returns the provided data for a method.
- Parameters:
string
- $methodName- Returns:
- array|Iterator when a data provider is specified and exists false when a data provider is specified but does not exist null when no data provider is specified
- Throws:
- PHPUnit_Framework_Exception
public static function getRequirements($className, $methodName)
Returns the requirements for a test.
- Parameters:
string
- $methodName- Returns:
- array
public static function getSize($className, $methodName)
Returns the size of the test.
- Parameters:
string
- $methodName- Returns:
- integer
public static function getTickets($className, $methodName)
Returns the tickets for a test class or method.
- Parameters:
string
- $methodName- Returns:
- array
private static function isAfterClassMethod(ReflectionMethod $method)
- Parameters:
ReflectionMethod
- $method- Returns:
- boolean
private static function isAfterMethod(ReflectionMethod $method)
- Parameters:
ReflectionMethod
- $method- Returns:
- boolean
private static function isBeforeClassMethod(ReflectionMethod $method)
- Parameters:
ReflectionMethod
- $method- Returns:
- boolean
private static function isBeforeMethod(ReflectionMethod $method)
- Parameters:
ReflectionMethod
- $method- Returns:
- boolean
private static function parseAnnotationContent($message)
Parse annotation content to use constant/class constant values
Constants are specified using a starting '@'. For example: @ClassName::CONST_NAME
If the constant is not found the string is used as is to ensure maximum BC.
- Parameters:
string
- $message- Returns:
- string
private static function parseAnnotations($docblock)
- Parameters:
string
- $docblock- Returns:
- array
public static function parseTestMethodAnnotations($className, $methodName = "")
- Parameters:
string
- $methodName- Defaults:
methodName
=""
- Returns:
- array
- Throws:
- ReflectionException
private static function resolveElementToReflectionObjects($element)
- Parameters:
string
- $element- Returns:
- array
- Throws:
- PHPUnit_Framework_InvalidCoversTargetException
private static function resolveReflectionObjectsToLines(array $reflectors)
- Parameters:
array
- $reflectors- Returns:
- array