public function testMatcherExchange() { $matcher = $this->getMock(MatcherInterface::class); $rule = new Rule($this->getMock(MatcherInterface::class)); $rule->setMatcher($matcher); $this->assertSame($matcher, $rule->getMatcher()); }
/** * @param $source * * @return Token[] */ public function match($source) { $this->factory->setType(Token::END); return parent::match($source); }