PHP Class lithium\test\filter\Affected

Affected test cases are determined by: 1. Looking at the subject of a test case. 2. Searching the class tree for any classes that directly depend on that subject. 3. Assigning test cases to those classes.
Inheritance: extends lithium\test\Filter
显示文件 Open project: unionofrad/lithium Class Usage Examples

Protected Properties

Property Type Description
$_cachedDepends

Public Methods

Method Description
analyze ( object $report, array $options = [] ) : array Analyzes the results of a test run and returns the result of the analysis.
apply ( object $report, array $tests, array $options = [] ) : object Takes an instance of an object (usually a Collection object) containing test instances. Adds affected tests to the test collection.

Protected Methods

Method Description
_affected ( string $dependency, string $exclude = null ) : array Returns all classes directly depending on a given class.

Method Details

_affected() protected static method

Returns all classes directly depending on a given class.
protected static _affected ( string $dependency, string $exclude = null ) : array
$dependency string The class name to use as a dependency.
$exclude string Regex path exclusion filter.
return array Classes having a direct dependency on `$dependency`. May contain duplicates.

analyze() public static method

Analyzes the results of a test run and returns the result of the analysis.
public static analyze ( object $report, array $options = [] ) : array
$report object The report instance running this filter and aggregating results
$options array
return array The results of the analysis.

apply() public static method

Takes an instance of an object (usually a Collection object) containing test instances. Adds affected tests to the test collection.
public static apply ( object $report, array $tests, array $options = [] ) : object
$report object Instance of Report which is calling apply.
$tests array The test to apply this filter on
$options array Not used.
return object Returns the instance of `$tests`.

Property Details

$_cachedDepends protected_oe static_oe property

protected static $_cachedDepends