예제 #1
0
 /**
  * @dataProvider getUnoptimizedData
  */
 public function testCompileWithoutOptimization($expression, $expectedDescription)
 {
     $lexer = new Lexer();
     $parser = new Parser(array());
     $compiler = new Compiler();
     $node = $parser->parse($lexer->tokenize($expression));
     $aDie = $compiler->compile($node);
     $this->assertEquals($expectedDescription, $aDie->getValueDescription());
 }
예제 #2
0
파일: ParserTest.php 프로젝트: fervo/rollo
 /**
  * @dataProvider getParseData
  */
 public function testParse($node, $expression, $names = array())
 {
     $lexer = new Lexer();
     $parser = new Parser(array());
     $this->assertEquals($node, $parser->parse($lexer->tokenize($expression), $names));
 }