/** * test using an object as a filter; an object fiter will retain its state * between calls to its filters */ function test_object_filter() { $var = new LiquidVariable('var | instance_test_one'); $this->context->set('var', 1000); $this->context->addFilters(new TestClassFilter()); $this->assertIdentical('set', $var->render($this->context)); $var = new LiquidVariable('var | instance_test_two'); $this->assertIdentical('set', $var->render($this->context)); }
function test_strip_html() { $var = new LiquidVariable("var | strip_html"); $this->context->set('var', "<b>bla blub</a>"); $this->assertEqual("bla blub", $var->render($this->context)); }