FastFeed\Processor\StripTagsProcessor::process PHP Méthode

process() public méthode

Execute processor
public process ( array $items ) : array
$items array
Résultat array $items
    public function process(array $items)
    {
        foreach ($items as $key => $item) {
            $items[$key] = $this->doClean($item);
        }
        return $items;
    }

Usage Example

 /**
  * @dataProvider dataProvider
  */
 public function testProcess($expected, $actual, $allowedTags)
 {
     $this->items[0]->setIntro($actual);
     $this->items[0]->setContent($actual);
     $this->processor->setAllowedTagsForContent($allowedTags);
     $this->processor->setAllowedTagsForIntro($allowedTags);
     $this->items = $this->processor->process($this->items);
     $this->assertEquals($expected, $this->items[0]->getIntro());
     $this->assertEquals($expected, $this->items[0]->getContent());
 }