/** * @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()); }
/** * @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)); }