Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 48 lines (42 sloc) 1.476 kB
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
1 <?php
2 /**
3 * Lithium: the most rad php framework
4 *
14de7bf @gwoo Happy 2012!
gwoo authored
5 * @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
6 * @license http://opensource.org/licenses/bsd-license.php The BSD License
7 */
8
35469c8 @indiefan Renamed filter and reporter base classes and updated subclasses
indiefan authored
9 namespace lithium\test;
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
10
11 /**
abaf031 @indiefan Fixed Filter Documentation to refer to proper classname
indiefan authored
12 * `Filter` is the base class for all test filters.
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
13 */
74583cd @indiefan Made abstract Filter class abstract and moved default analyze behavio…
indiefan authored
14 abstract class Filter extends \lithium\core\StaticObject {
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
15
16 /**
17 * Takes an instance of an object (usually a Collection object) containing test
18 * instances. Allows for preparing tests before they are run.
19 *
c27bae2 @indiefan Updated Test Filter Base class to support a stateless interface to th…
indiefan authored
20 * @param object $report Instance of Report which is calling apply.
6fef0bb @indiefan Fixed Bug when applying multiple test filters.
indiefan authored
21 * @param array $tests The test to apply this filter on
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
22 * @param array $options Options for how this filter should be applied.
c25e039 @Howard3 Cleaning up PHPDoc @return tags with multiple return types defined.
Howard3 authored
23 * @return object Returns the instance of `$tests`.
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
24 */
6fef0bb @indiefan Fixed Bug when applying multiple test filters.
indiefan authored
25 public static function apply($report, $tests, array $options = array()) {}
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
26
27 /**
28 * Analyzes the results of a test run and returns the result of the analysis.
29 *
0a1f783 @indiefan Refactored test filters to analyze report instance.
indiefan authored
30 * @param object $report The report instance running this filter and aggregating results
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
31 * @param array $options
798b01f @indiefan Updated documentation for Filter->analyze
indiefan authored
32 * @return array The results of the analysis.
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
33 */
74583cd @indiefan Made abstract Filter class abstract and moved default analyze behavio…
indiefan authored
34 public static function analyze($report, array $options = array()) {
35 return $report->results['filters'][get_called_class()];
36 }
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
37
38 /**
39 * Returns data to be output by a reporter.
40 *
41 * @param string $format I.e. `'html'` or `'text'`.
42 * @param array $analysis The results of the analysis.
c25e039 @Howard3 Cleaning up PHPDoc @return tags with multiple return types defined.
Howard3 authored
43 * @return string
e6cd7c1 @davidpersson Adding `Base` test filter.
davidpersson authored
44 */
45 public static function output($format, $analysis) {}
46 }
47
48 ?>
Something went wrong with that request. Please try again.