class PHPUnit_Util_Test (View source)

Test helpers.

Constants

REGEX_DATA_PROVIDER

REGEX_TEST_WITH

REGEX_EXPECTED_EXCEPTION

REGEX_REQUIRES_VERSION

REGEX_REQUIRES_OS

REGEX_REQUIRES

UNKNOWN

SMALL

MEDIUM

LARGE

Methods

static mixed
describe(PHPUnit_Framework_Test $test, bool $asString = true)

No description

static array|bool
getLinesToBeCovered(string $className, string $methodName)

No description

static array
getLinesToBeUsed(string $className, string $methodName)

Returns lines of code specified with the @uses annotation.

static array
getRequirements(string $className, string $methodName)

Returns the requirements for a test.

static array
getMissingRequirements(string $className, string $methodName)

Returns the missing requirements for a test.

static array
getExpectedException(string $className, string $methodName)

Returns the expected exception for a test.

static array
getProvidedData(string $className, string $methodName)

Returns the provided data for a method.

static array
getDataFromTestWithAnnotation(string $docComment)

No description

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

No description

static array
getInlineAnnotations(string $className, string $methodName)

No description

static array
getBackupSettings(string $className, string $methodName)

Returns the backup settings for a test.

static array
getDependencies(string $className, string $methodName)

Returns the dependencies for a test class or method.

static bool
getErrorHandlerSettings(string $className, string $methodName)

Returns the error handler settings for a test.

static array
getGroups(string $className, string $methodName = '')

Returns the groups for a test class or method.

static int
getSize(string $className, string $methodName)

Returns the size of the test.

static array
getTickets(string $className, string $methodName)

Returns the tickets for a test class or method.

static bool
getProcessIsolationSettings(string $className, string $methodName)

Returns the process isolation settings for a test.

static bool
getPreserveGlobalStateSettings(string $className, string $methodName)

Returns the preserve global state settings for a test.

static array
getHookMethods(string $className)

No description

Details

static mixed describe(PHPUnit_Framework_Test $test, bool $asString = true)

Parameters

PHPUnit_Framework_Test $test
bool $asString

Return Value

mixed

static array|bool getLinesToBeCovered(string $className, string $methodName)

Parameters

string $className
string $methodName

Return Value

array|bool

Exceptions

PHPUnit_Framework_CodeCoverageException

static array getLinesToBeUsed(string $className, string $methodName)

Returns lines of code specified with the @uses annotation.

Parameters

string $className
string $methodName

Return Value

array

static array getRequirements(string $className, string $methodName)

Returns the requirements for a test.

Parameters

string $className
string $methodName

Return Value

array

static array getMissingRequirements(string $className, string $methodName)

Returns the missing requirements for a test.

Parameters

string $className
string $methodName

Return Value

array

static array getExpectedException(string $className, string $methodName)

Returns the expected exception for a test.

Parameters

string $className
string $methodName

Return Value

array

static array getProvidedData(string $className, string $methodName)

Returns the provided data for a method.

Parameters

string $className
string $methodName

Return Value

array When a data provider is specified and exists null When no data provider is specified

Exceptions

PHPUnit_Framework_Exception

static array getDataFromTestWithAnnotation(string $docComment)

Parameters

string $docComment full docComment string

Return Value

array when @testWith annotation is defined null when @testWith annotation is omitted

Exceptions

PHPUnit_Framework_Exception when @testWith annotation is defined but cannot be parsed

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

Parameters

string $className
string $methodName

Return Value

array

Exceptions

ReflectionException

static array getInlineAnnotations(string $className, string $methodName)

Parameters

string $className
string $methodName

Return Value

array

static array getBackupSettings(string $className, string $methodName)

Returns the backup settings for a test.

Parameters

string $className
string $methodName

Return Value

array

static array getDependencies(string $className, string $methodName)

Returns the dependencies for a test class or method.

Parameters

string $className
string $methodName

Return Value

array

static bool getErrorHandlerSettings(string $className, string $methodName)

Returns the error handler settings for a test.

Parameters

string $className
string $methodName

Return Value

bool

static array getGroups(string $className, string $methodName = '')

Returns the groups for a test class or method.

Parameters

string $className
string $methodName

Return Value

array

static int getSize(string $className, string $methodName)

Returns the size of the test.

Parameters

string $className
string $methodName

Return Value

int

static array getTickets(string $className, string $methodName)

Returns the tickets for a test class or method.

Parameters

string $className
string $methodName

Return Value

array

static bool getProcessIsolationSettings(string $className, string $methodName)

Returns the process isolation settings for a test.

Parameters

string $className
string $methodName

Return Value

bool

static bool getPreserveGlobalStateSettings(string $className, string $methodName)

Returns the preserve global state settings for a test.

Parameters

string $className
string $methodName

Return Value

bool

static array getHookMethods(string $className)

Parameters

string $className

Return Value

array