4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\ExpressionLanguage\Tests\Node;
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\ExpressionLanguage\Compiler;
17 abstract class AbstractNodeTest extends TestCase
20 * @dataProvider getEvaluateData
22 public function testEvaluate($expected, $node, $variables = array(), $functions = array())
24 $this->assertSame($expected, $node->evaluate($functions, $variables));
27 abstract public function getEvaluateData();
30 * @dataProvider getCompileData
32 public function testCompile($expected, $node, $functions = array())
34 $compiler = new Compiler($functions);
35 $node->compile($compiler);
36 $this->assertSame($expected, $compiler->getSource());
39 abstract public function getCompileData();