PhpUnitWrapper_Generic
class PhpUnitWrapper_Generic extends PhpUnitWrapper (View source)
Generic PhpUnitWrapper.
Originally intended for use with Composer based installations, but will work with any fully functional autoloader.
Properties
protected | string | $version | Shows the version, implemented by the phpunit-wrapper class instance. |
from PhpUnitWrapper |
protected | $coverage | |||
protected static | $test_name |
Methods
Getter for $reporter ($reporter).
Getter for $results ($results).
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 (IPhpUnitWrapper).
Overwrites beforeRunTests. Initiates coverage-report generation if $coverage has been set to true (setCoverageStatus).
Overwrites afterRunTests. Creates coverage report and clover report if required.
Perform all tests, added to the suite and initialises SilverStripe to collect the results of the unit tests.
Returns an array containing all the module folders in the base dir.
Details
bool
getCoverageStatus()
Getter for $coverage ($coverage).
setCoverageStatus($value)
Setter for $coverage ($coverage).
PHPUnit_Framework_TestSuite
getSuite()
Getter for $suite ($suite).
setSuite($value)
Setter for $suite ($suite).
PHPUnit_Framework_TestListener
getReporter()
Getter for $reporter ($reporter).
setReporter($value)
Setter for $reporter ($reporter).
PHPUnit_Framework_TestResult
getFrameworkTestResults()
Getter for $results ($results).
setFrameworkTestResults($value)
Setter for $results ($results).
string
getVersion()
Returns a version string, like 3.7.34 or 4.2-dev.
static PhpUnitWrapper
inst()
Loads and initiates phpunit, based on the available phpunit version.
static bool
has_php_unit()
Returns true if one of the two supported PHPUNIT versions is installed.
init()
Implements method, defined in the interface IPhpUnitWrapper:init (IPhpUnitWrapper).
This wrapper class doesn't require any initialisation.
protected
beforeRunTests()
Overwrites beforeRunTests. Initiates coverage-report generation if $coverage has been set to true (setCoverageStatus).
protected
afterRunTests()
Overwrites afterRunTests. Creates coverage report and clover report if required.
runTests()
Perform all tests, added to the suite and initialises SilverStripe to collect the results of the unit tests.
This method calls beforeRunTests and afterRunTests.
protected array
moduleDirectories()
Returns an array containing all the module folders in the base dir.
static
get_test_name()
No description