public function __construct($entity) { $this->entity = $entity; $this->params = new DefaultParameterMethod(); $config = Listr::getConfig(); if (!isset($config[$entity]['filters'])) { throw new OutOfBoundsException("Filter group '{$entity}' does not exist."); } foreach ($config[$entity]['filters'] as $name => $filter) { $this->items[] = new Filter\Filter($name, $filter, $this->params); } }
public function setUp() { Listr::setConfig($this->blogConfig); $this->filters = Listr::getFilters('blog'); }
/** * Filter cannot be created without label */ public function testFilterCannotBeCreatedWithoutLabel() { $this->setExpectedException('Exception', "Label needed for filter 'content'."); Listr::setConfig($this->configWithFilterWithoutLabel); }