public function testFilterValueWithArray() { $value = "this is <b> a string<p> with<b> tags</p> and\n malformed"; $filters = array(new Rules\StripTags(), new Rules\StripNewlines()); $filtered = $this->filter->filterValue($value, $filters); $this->assertNotEquals($value, $filtered); $this->assertNotContains('<b>', $filtered); $this->assertNotContains('<p>', $filtered); $this->assertNotContains('\\n', $filtered); }
/** * Runs a given value through one or more filter rules returning the * filtered value * * @param mixed $value * @param \DMS\Filter\Rules\Rule[]|\DMS\Filter\Rules\Rule $filter * * @return mixed */ public function filterValue($value, $filter) { return $this->filterExecutor->filterValue($value, $filter); }