This class, or a class parent, could not be found or loaded. This could be caused by a missing module or other dependancy. The documentation for class may not be complete!
A version of the stock PHPUnit testsuite that supports whitelisting and blacklisting for code coverage filter
Class declared in MODPATH/unittest/classes/kohana/unittest/testsuite.php on line 7.
array
$_filter_callsHolds the details of files that should be white and blacklisted for code coverage
Queues a directory to be added to the code coverage blacklist when the suite runs
string
$dir
required - $dirpublic function addDirectoryToBlacklist($dir)
{
$this->_filter_calls['addDirectoryToBlacklist'][] = $dir;
}
Queues a file to be added to the code coverage blacklist when the suite runs
string
$file
required - public function addFileToBlacklist($file)
{
$this->_filter_calls['addFileToBlacklist'][] = $file;
}
Queues a file to be added to the code coverage whitelist when the suite runs
string
$file
required - public function addFileToWhitelist($file)
{
$this->_filter_calls['addFileToWhitelist'][] = $file;
}
Runs the tests and collects their result in a TestResult.
PHPUnit_Framework_TestResult
$result
= NULL - $resultmixed
$filter
= bool FALSE - $filterarray
$groups
= array(0) - $groupsarray
$excludeGroups
= array(0) - $excludeGroupsboolean
$processIsolation
= bool FALSE - $processIsolationPHPUnit_Framework_TestResult
public function run(PHPUnit_Framework_TestResult $result = NULL, $filter = FALSE, array $groups = array(), array $excludeGroups = array(), $processIsolation = FALSE)
{
Get the code coverage filter from the suite's result object
overage = $result->getCodeCoverage();
($coverage)
coverage_filter = $coverage->filter();
/ Apply the white and blacklisting
oreach ($this->_filter_calls as $method => $args)
foreach ($args as $arg)
{
$coverage_filter->$method($arg);
}
turn parent::run($result, $filter, $groups, $excludeGroups, $processIsolation);
Creates classes when they are otherwise not found.
Kodoc::create_class('ThisClassDoesNotExist');
All classes created will extend Kodoc_Missing.
string
$class
required - Class nameboolean
public static function create_class($class)
{
if ( ! class_exists($class))
{
// Create a new missing class
eval("class {$class} extends Kodoc_Missing {}");
}
return TRUE;
}