/** * @dataProvider shortCircuitProviderCompile */ public function testShortCircuitOperatorsCompile($expression, array $names, $expected) { $result = null; $expressionLanguage = new ExpressionLanguage(); eval(sprintf('$result = %s;', $expressionLanguage->compile($expression, $names))); $this->assertSame($expected, $result); }
/** * Evaluate an expression. * * @param Expression|string $expression The expression to compile * @param array $values An array of values * * @return string The result of the evaluation of the expression */ public function evaluate($expression, $values = array()) { return parent::evaluate($expression, $this->getUppercaseValues($values)); }