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\UnaryNode;
15 use Symfony\Component\ExpressionLanguage\Node\ConstantNode;
17 class UnaryNodeTest extends AbstractNodeTest
19 public function getEvaluateData()
22 array(-1, new UnaryNode('-', new ConstantNode(1))),
23 array(3, new UnaryNode('+', new ConstantNode(3))),
24 array(false, new UnaryNode('!', new ConstantNode(true))),
25 array(false, new UnaryNode('not', new ConstantNode(true))),
29 public function getCompileData()
32 array('(-1)', new UnaryNode('-', new ConstantNode(1))),
33 array('(+3)', new UnaryNode('+', new ConstantNode(3))),
34 array('(!true)', new UnaryNode('!', new ConstantNode(true))),
35 array('(!true)', new UnaryNode('not', new ConstantNode(true))),