PHPUnit
PHPUnit TYPO3 extension
 All Classes Namespaces Functions
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Tx_Phpunit_Testable Class Reference

Public Member Functions

 getKey ()
 
 setKey ($key)
 
 getTitle ()
 
 setTitle ($title)
 
 getType ()
 
 setType ($type)
 
 getCodePath ()
 
 setCodePath ($codePath)
 
 getTestsPath ()
 
 setTestsPath ($testsPath)
 
 getBlacklist ()
 
 setBlacklist (array $files)
 
 getWhitelist ()
 
 setWhitelist (array $files)
 
 getIconPath ()
 
 setIconPath ($iconPath)
 

Public Attributes

const TYPE_UNDEFINED = 0
 
const TYPE_EXTENSION = 1
 
const TYPE_CORE = 2
 
const CORE_KEY = 'typo3'
 
const ALL_EXTENSIONS = 'uuall'
 

Protected Attributes

 $key = ''
 
 $title = ''
 
 $type = self::TYPE_UNDEFINED
 
 $codePath = ''
 
 $testsPath = ''
 
 $blacklist = array()
 
 $whitelist = array()
 
 $iconPath = ''
 

Member Function Documentation

Tx_Phpunit_Testable::getBlacklist ( )

Returns the blacklist, i.e., the absolute paths to the files that should be excluded from the code coverage report.

Returns
array<string> the absolute paths to the blacklisted files, might be empty
Tx_Phpunit_Testable::getCodePath ( )

Returns the code path.

This is the absolute path of the code that is tested.

Returns
string the code path, will not be empty
Tx_Phpunit_Testable::getIconPath ( )

Returns the relative path to the icon associated with this testable code.

Returns
string the relative icon path, will not be empty
Tx_Phpunit_Testable::getKey ( )

Returns the key.

The key is intended to be used e.g., for drop-downs.

For extensions, this will be the extension key. For the TYPO3 core, this will be "typo3". For out-of-line tests, this will be full path to the tested code.

Returns
string the key, will not be empty
Tx_Phpunit_Testable::getTestsPath ( )

Returns the tests path.

This is the absolute path of the unit tests. Usually, this path is located within the code path.

Returns
string the tests path, will not be empty
Tx_Phpunit_Testable::getTitle ( )

Returns the display title.

Returns
string the title, might be empty
Tx_Phpunit_Testable::getType ( )

Returns the type of this testable code.

Returns
integer the type, will be either TYPE_UNDEFINED, TYPE_EXTENSION or TYPE_CORE
Tx_Phpunit_Testable::getWhitelist ( )

Returns the whitelist, i.e., the absolute paths to the files that should be included in the code coverage report.

Returns
array<string> the absolute paths to the whitelisted files, might be empty
Tx_Phpunit_Testable::setBlacklist ( array  $files)

Sets the blacklist, i.e., the absolute paths to the files that should be excluded from the code coverage report.

Parameters
array<string>$files the absolute paths to the blacklisted files, may be empty
Returns
void
Tx_Phpunit_Testable::setCodePath (   $codePath)

Sets the code path.

This is the absolute path of the code that is tested.

Parameters
string$codePaththe code path, must not be empty
Returns
void
Exceptions
InvalidArgumentException
Tx_Phpunit_Testable::setIconPath (   $iconPath)

Sets the relative path to the icon associated with this testable code.

Parameters
string$iconPaththe icon path, must not be empty
Returns
void
Exceptions
InvalidArgumentException
Tx_Phpunit_Testable::setKey (   $key)

Sets the key.

The key is intended to be used e.g., for drop-downs.

For extensions, this must be the extension key. For the TYPO3 core, this must be "typo3". For out-of-line tests, this must be full path to the tested code.

Parameters
string$keythe key, must not be empty
Returns
void
Exceptions
InvalidArgumentException
Tx_Phpunit_Testable::setTestsPath (   $testsPath)

Sets the tests path.

This is the absolute path of the unit tests. Usually, this path is located within the code path.

Parameters
string$testsPaththe tests path, must not be empty
Returns
void
Exceptions
InvalidArgumentException
Tx_Phpunit_Testable::setTitle (   $title)

Sets the display title.

Parameters
string$titlethe title, may be empty
Returns
void
Tx_Phpunit_Testable::setType (   $type)

Sets the type of this testable code.

Parameters
integer$typethe type, must be either TYPE_EXTENSION or TYPE_CORE
Returns
void
Exceptions
InvalidArgumentException
Tx_Phpunit_Testable::setWhitelist ( array  $files)

Sets the whitelist, i.e., the absolute paths to the files that should be included in the code coverage report.

Parameters
array<string>$files the absolute paths to the whitelisted files, may be empty
Returns
void

The documentation for this class was generated from the following file: