Neos\Eel\Tests\Unit\AbstractEvaluatorTest::conditionalOperatorExpressions PHP Method

conditionalOperatorExpressions() public method

    public function conditionalOperatorExpressions()
    {
        $c = new Context(['answer' => 42, 'trueVar' => true, 'a' => 5, 'b' => 10]);
        return [['TRUE ? 1 : 2', $c, 1], ['trueVar ? answer : FALSE', $c, 42], ['!trueVar ? FALSE : answer', $c, 42], ['a < b ? 1 : 2', $c, 1], ['a < b ? 1 + a : 2 + b', $c, 6], ['a > b ? 1 + a : 2 + b', $c, 12]];
    }