/**
  * @param string $allowedElements
  * @param string $expected
  *
  * @dataProvider attributesDataProvider
  */
 public function testGetAttributes($allowedElements, $expected)
 {
     $this->assertEquals($expected, $this->converter->getAttributes($allowedElements));
 }
Exemplo n.º 2
0
 /**
  * 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));
     }
 }