db backup prior to drupal security update
[yaffs-website] / vendor / symfony / expression-language / Tests / Node / UnaryNodeTest.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 Symfony\Component\ExpressionLanguage\Node\UnaryNode;
15 use Symfony\Component\ExpressionLanguage\Node\ConstantNode;
16
17 class UnaryNodeTest extends AbstractNodeTest
18 {
19     public function getEvaluateData()
20     {
21         return array(
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))),
26         );
27     }
28
29     public function getCompileData()
30     {
31         return array(
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))),
36         );
37     }
38 }