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\FunctionNode;
15 use Symfony\Component\ExpressionLanguage\Node\ConstantNode;
16 use Symfony\Component\ExpressionLanguage\Node\Node;
18 class FunctionNodeTest extends AbstractNodeTest
20 public function getEvaluateData()
23 array('bar', new FunctionNode('foo', new Node(array(new ConstantNode('bar')))), array(), array('foo' => $this->getCallables())),
27 public function getCompileData()
30 array('foo("bar")', new FunctionNode('foo', new Node(array(new ConstantNode('bar')))), array('foo' => $this->getCallables())),
34 protected function getCallables()
37 'compiler' => function ($arg) {
38 return sprintf('foo(%s)', $arg);
40 'evaluator' => function ($variables, $arg) {