예제 #1
0
 /**
  * @testdox Sets the filter's signature to ['tag' => null]
  */
 public function testDefaultSignature()
 {
     $filter = new TagFilter(function ($v) {
     });
     $config = $filter->asConfig();
     $this->assertSame(['tag' => null], $config['params']);
 }
예제 #2
0
 /**
  * @testdox getParser() removes JavaScript-specific data from tag filters
  */
 public function testAsConfigRemovesJavaScriptTagFilters()
 {
     $pc = new TagFilter(function ($tag) {
     });
     $pc->setJS('function(tag){return false;}');
     $this->configurator->tags->add('A')->filterChain->append($pc);
     $parser = $this->configurator->getParser();
     $tagsConfig = $this->readAttribute($parser, 'tagsConfig');
     $this->assertArrayNotHasKey('js', $tagsConfig['A']['filterChain'][0]);
 }