X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fsymfony%2Fexpression-language%2FTests%2FNode%2FConstantNodeTest.php;fp=vendor%2Fsymfony%2Fexpression-language%2FTests%2FNode%2FConstantNodeTest.php;h=c1a67a86038291e2f42b46eb583853e66fed97d3;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/vendor/symfony/expression-language/Tests/Node/ConstantNodeTest.php b/vendor/symfony/expression-language/Tests/Node/ConstantNodeTest.php new file mode 100644 index 000000000..c1a67a860 --- /dev/null +++ b/vendor/symfony/expression-language/Tests/Node/ConstantNodeTest.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\ExpressionLanguage\Tests\Node; + +use Symfony\Component\ExpressionLanguage\Node\ConstantNode; + +class ConstantNodeTest extends AbstractNodeTest +{ + public function getEvaluateData() + { + return array( + array(false, new ConstantNode(false)), + array(true, new ConstantNode(true)), + array(null, new ConstantNode(null)), + array(3, new ConstantNode(3)), + array(3.3, new ConstantNode(3.3)), + array('foo', new ConstantNode('foo')), + array(array(1, 'b' => 'a'), new ConstantNode(array(1, 'b' => 'a'))), + ); + } + + public function getCompileData() + { + return array( + array('false', new ConstantNode(false)), + array('true', new ConstantNode(true)), + array('null', new ConstantNode(null)), + array('3', new ConstantNode(3)), + array('3.3', new ConstantNode(3.3)), + array('"foo"', new ConstantNode('foo')), + array('array(0 => 1, "b" => "a")', new ConstantNode(array(1, 'b' => 'a'))), + ); + } +}