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