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