/** * @param string $allowedElements * @param string $expected * * @dataProvider elementsDataProvider */ public function testGetElements($allowedElements, $expected) { $this->assertEquals($expected, $this->converter->getElements($allowedElements)); }
/** * Configure allowed tags * * @param \HTMLPurifier_Config $config */ protected function fillAllowedElementsConfig($config) { $converter = new TagDefinitionConverter(); if ($this->allowedElements) { $config->set('HTML.AllowedElements', $converter->getElements($this->allowedElements)); $config->set('HTML.AllowedAttributes', $converter->getAttributes($this->allowedElements)); } }