示例#1
0
 /**
  * Parse a version range & return an object implementing VersionRangeInterface that encodes those rules.
  *
  * @param string $rangeString
  *
  * @return VersionRangeInterface
  */
 public function parseRange($rangeString)
 {
     $tokenList = $this->tokenizer->tokenize($rangeString);
     return $this->parser->parseRange($tokenList);
 }
示例#2
0
 /**
  * @dataProvider tokenProvider
  *
  * @param string $version
  * @param Token[] $tokenList
  */
 public function testTokenize($version, $tokenList)
 {
     $tokenizer = new VersionTokenizer();
     $this->assertEquals($tokenList, $tokenizer->tokenize($version));
 }