db backup prior to drupal security update
[yaffs-website] / vendor / symfony / expression-language / Tests / Node / AbstractNodeTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\ExpressionLanguage\Tests\Node;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\ExpressionLanguage\Compiler;
16
17 abstract class AbstractNodeTest extends TestCase
18 {
19     /**
20      * @dataProvider getEvaluateData
21      */
22     public function testEvaluate($expected, $node, $variables = array(), $functions = array())
23     {
24         $this->assertSame($expected, $node->evaluate($functions, $variables));
25     }
26
27     abstract public function getEvaluateData();
28
29     /**
30      * @dataProvider getCompileData
31      */
32     public function testCompile($expected, $node, $functions = array())
33     {
34         $compiler = new Compiler($functions);
35         $node->compile($compiler);
36         $this->assertSame($expected, $compiler->getSource());
37     }
38
39     abstract public function getCompileData();
40 }