/**
  * @test
  */
 public function doesNotMatchInvalidValues()
 {
     $this->assertFalse($this->matcher->match(1));
     $this->assertFalse($this->matcher->match('two'));
 }
Ejemplo n.º 2
0
 /**
  * Creates a new {@link \bitExpert\Pathfinder\Matcher\ConstantSetMatcher}.
  *
  * @param mixed $classIdentifier Class or object to get the constants from
  * @param string $pattern A simplified expression using * as placeholder
  */
 public function __construct($classIdentifier, string $pattern)
 {
     $regex = $this->transformPatternToRegEx($pattern);
     $values = $this->getConstantValues($classIdentifier, $regex);
     parent::__construct($values);
 }