lithium\test\Report::filters()

public method

Getter/setter for report test filters.

Parameters

  • array $filters

    A set of filters, mapping the filter class names, to their corresponding array of options. When not provided, simply returns current set of filters.

Returns

array

The current set of filters.

Source

	public function filters(array $filters = []) {
		foreach ($filters as $filter => $options) {
			if (!$class = Libraries::locate('test.filter', $filter)) {
				throw new ClassNotFoundException("`{$class}` is not a valid test filter.");
			}
			$this->_filters[$class] = $options + [
				'name' => strtolower(join('', array_slice(explode("\\", $class), -1))),
				'apply' => [],
				'analyze' => []
			];
		}
		return $this->_filters;
	}