PHP Class PHPUnit_Util_Test, phpunit

Author: Sebastian Bergmann ([email protected])
Show file Open project: sebastianbergmann/phpunit Class Usage Examples

Public Methods

Method Description
describe ( PHPUnit_Framework_Test $test, boolean $asString = true ) : mixed
getBackupSettings ( string $className, string $methodName ) : array Returns the backup settings for a test.
getDataFromTestWithAnnotation ( string $docComment ) : array
getDependencies ( string $className, string $methodName ) : array Returns the dependencies for a test class or method.
getErrorHandlerSettings ( string $className, string $methodName ) : boolean Returns the error handler settings for a test.
getExpectedException ( string $className, string $methodName ) : array Returns the expected exception for a test.
getGroups ( string $className, string $methodName = '' ) : array Returns the groups for a test class or method.
getHookMethods ( string $className ) : array
getInlineAnnotations ( string $className, string $methodName ) : array
getLinesToBeCovered ( string $className, string $methodName ) : array | boolean
getLinesToBeUsed ( string $className, string $methodName ) : array Returns lines of code specified with the @uses annotation.
getMissingRequirements ( string $className, string $methodName ) : array Returns the missing requirements for a test.
getPreserveGlobalStateSettings ( string $className, string $methodName ) : boolean Returns the preserve global state settings for a test.
getProcessIsolationSettings ( string $className, string $methodName ) : boolean Returns the process isolation settings for a test.
getProvidedData ( string $className, string $methodName ) : array | Iterator Returns the provided data for a method.
getRequirements ( string $className, string $methodName ) : array Returns the requirements for a test.
getSize ( string $className, string $methodName ) : integer Returns the size of the test.
parseTestMethodAnnotations ( string $className, string $methodName = '' ) : array

Private Methods

Method Description
cleanUpMultiLineAnnotation ( $docComment )
emptyHookMethodsArray ( ) : array
getBooleanAnnotationSetting ( string $className, string $methodName, string $settingName ) : boolean
getDataFromDataProviderAnnotation ( string $docComment, string $className, string $methodName ) : array | Iterator Returns the provided data for a method.
getLinesToBeCoveredOrUsed ( string $className, string $methodName, string $mode ) : array
isAfterClassMethod ( ReflectionMethod $method ) : boolean
isAfterMethod ( ReflectionMethod $method ) : boolean
isBeforeClassMethod ( ReflectionMethod $method ) : boolean
isBeforeMethod ( ReflectionMethod $method ) : boolean
parseAnnotationContent ( string $message ) : string Parse annotation content to use constant/class constant values
parseAnnotations ( string $docblock ) : array
resolveElementToReflectionObjects ( string $element ) : array
resolveReflectionObjectsToLines ( array $reflectors ) : array

Method Details

describe() public static method

public static describe ( PHPUnit_Framework_Test $test, boolean $asString = true ) : mixed
$test PHPUnit_Framework_Test
$asString boolean
return mixed

getBackupSettings() public static method

Returns the backup settings for a test.
public static getBackupSettings ( string $className, string $methodName ) : array
$className string
$methodName string
return array

getDataFromTestWithAnnotation() public static method

public static getDataFromTestWithAnnotation ( string $docComment ) : array
$docComment string full docComment string
return array when @testWith annotation is defined null when @testWith annotation is omitted

getDependencies() public static method

Returns the dependencies for a test class or method.
public static getDependencies ( string $className, string $methodName ) : array
$className string
$methodName string
return array

getErrorHandlerSettings() public static method

Returns the error handler settings for a test.
public static getErrorHandlerSettings ( string $className, string $methodName ) : boolean
$className string
$methodName string
return boolean

getExpectedException() public static method

Returns the expected exception for a test.
public static getExpectedException ( string $className, string $methodName ) : array
$className string
$methodName string
return array

getGroups() public static method

Returns the groups for a test class or method.
public static getGroups ( string $className, string $methodName = '' ) : array
$className string
$methodName string
return array

getHookMethods() public static method

public static getHookMethods ( string $className ) : array
$className string
return array

getInlineAnnotations() public static method

public static getInlineAnnotations ( string $className, string $methodName ) : array
$className string
$methodName string
return array

getLinesToBeCovered() public static method

public static getLinesToBeCovered ( string $className, string $methodName ) : array | boolean
$className string
$methodName string
return array | boolean

getLinesToBeUsed() public static method

Returns lines of code specified with the @uses annotation.
public static getLinesToBeUsed ( string $className, string $methodName ) : array
$className string
$methodName string
return array

getMissingRequirements() public static method

Returns the missing requirements for a test.
public static getMissingRequirements ( string $className, string $methodName ) : array
$className string
$methodName string
return array

getPreserveGlobalStateSettings() public static method

Returns the preserve global state settings for a test.
public static getPreserveGlobalStateSettings ( string $className, string $methodName ) : boolean
$className string
$methodName string
return boolean

getProcessIsolationSettings() public static method

Returns the process isolation settings for a test.
public static getProcessIsolationSettings ( string $className, string $methodName ) : boolean
$className string
$methodName string
return boolean

getProvidedData() public static method

Returns the provided data for a method.
public static getProvidedData ( string $className, string $methodName ) : array | Iterator
$className string
$methodName string
return array | Iterator when a data provider is specified and exists null when no data provider is specified

getRequirements() public static method

Returns the requirements for a test.
public static getRequirements ( string $className, string $methodName ) : array
$className string
$methodName string
return array

getSize() public static method

Returns the size of the test.
public static getSize ( string $className, string $methodName ) : integer
$className string
$methodName string
return integer

parseTestMethodAnnotations() public static method

public static parseTestMethodAnnotations ( string $className, string $methodName = '' ) : array
$className string
$methodName string
return array