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 Symfony\Component\ExpressionLanguage\Node\ConstantNode;
16 class ConstantNodeTest extends AbstractNodeTest
18 public function getEvaluateData()
21 array(false, new ConstantNode(false)),
22 array(true, new ConstantNode(true)),
23 array(null, new ConstantNode(null)),
24 array(3, new ConstantNode(3)),
25 array(3.3, new ConstantNode(3.3)),
26 array('foo', new ConstantNode('foo')),
27 array(array(1, 'b' => 'a'), new ConstantNode(array(1, 'b' => 'a'))),
31 public function getCompileData()
34 array('false', new ConstantNode(false)),
35 array('true', new ConstantNode(true)),
36 array('null', new ConstantNode(null)),
37 array('3', new ConstantNode(3)),
38 array('3.3', new ConstantNode(3.3)),
39 array('"foo"', new ConstantNode('foo')),
40 array('array(0 => 1, "b" => "a")', new ConstantNode(array(1, 'b' => 'a'))),