PhpUnitWrapper
class PhpUnitWrapper implements IPhpUnitWrapper
PHPUnit Wrapper class.
Base class for PHPUnit wrapper classes to support different PHPUnit versions. The current implementation supports PHPUnit 3.4 and PHPUnit 3.5.
Methods
Getter for $coverage (see $coverage).
Setter for $coverage (see $coverage).
Getter for $suite (see $suite).
Setter for $suite (see $suite).
Getter for $reporter (see $reporter).
Setter for $reporter (see $reporter).
Getter for $results (see $results).
Setter for $results (see $results).
Getter for $version (see $version).
Loads and initiates phpunit, based on the available phpunit version.
Returns true if one of the two supported PHPUNIT versions is installed.
Implements method, defined in the interface IPhpUnitWrapper:init (see IPhpUnitWrapper).
Perform all tests, added to the suite and initialises SilverStripe to collect the results of the unit tests.
Details
at line 65
boolean
getCoverageStatus()
Getter for $coverage (see $coverage).
at line 73
setCoverageStatus($value)
Setter for $coverage (see $coverage).
at line 81
PHPUnit_Framework_TestSuite
getSuite()
Getter for $suite (see $suite).
at line 89
setSuite($value)
Setter for $suite (see $suite).
at line 97
PHPUnit_Framework_TestListener
getReporter()
Getter for $reporter (see $reporter).
at line 105
setReporter($value)
Setter for $reporter (see $reporter).
at line 113
PHPUnit_Framework_TestResult
getFrameworkTestResults()
Getter for $results (see $results).
at line 121
setFrameworkTestResults($value)
Setter for $results (see $results).
at line 129
String
getVersion()
Getter for $version (see $version).
at line 138
static PhpUnitWrapper
inst()
Loads and initiates phpunit, based on the available phpunit version.
at line 168
static boolean
has_php_unit()
Returns true if one of the two supported PHPUNIT versions is installed.
at line 176
init()
Implements method, defined in the interface IPhpUnitWrapper:init (see IPhpUnitWrapper).
This wrapper class doesn't require any initialisation.
at line 205
runTests()
Perform all tests, added to the suite and initialises SilverStripe to collect the results of the unit tests.
This method calls see beforeRunTests and see afterRunTests.