public function addElementToContentSet($element, $type) { if (!isset($this->content_sets[$type])) { $this->content_sets[$type] = ''; } else { $this->content_sets[$type] .= ' | '; } $this->content_sets[$type] .= $element; }
public function test_addElementToContentSet() { $module = new HTMLPurifier_HTMLModule(); $module->addElementToContentSet('b', 'Inline'); $this->assertIdentical($module->content_sets, array('Inline' => 'b')); $module->addElementToContentSet('i', 'Inline'); $this->assertIdentical($module->content_sets, array('Inline' => 'b | i')); }