Ejemplo n.º 1
0
 public function testEnable()
 {
     $rule = new Rule(new WholeMatcher(), ['enabled' => false]);
     $rule->enable();
     $this->assertNotEmpty($rule->match('source'));
 }
Ejemplo n.º 2
0
 /**
  * @param $source
  *
  * @return Token[]
  */
 public function match($source)
 {
     $this->factory->setType(Token::END);
     return parent::match($source);
 }