diff --git a/tests/unit/classes/template/TemplateHandlerTest.php b/tests/unit/classes/template/TemplateHandlerTest.php index 9c8279664a..97bc0acdc6 100644 --- a/tests/unit/classes/template/TemplateHandlerTest.php +++ b/tests/unit/classes/template/TemplateHandlerTest.php @@ -289,11 +289,15 @@ static public function provider() ), array( '<config autoescape="on" />{$foo|auto}', - PHP_EOL . '$this->config->autoescape = \'on\';' . "\n" . 'echo ($this->config->autoescape === \'on\' ? escape($__Context->foo, false) : $__Context->foo) ?>' + PHP_EOL . '$this->config->autoescape = \'on\';' . "\n" . 'echo ($this->config->autoescape === \'on\' ? escape($__Context->foo, false) : ($__Context->foo)) ?>' ), array( '<config autoescape="off" />{$foo|auto}', - PHP_EOL . '$this->config->autoescape = \'off\';' . "\n" . 'echo ($this->config->autoescape === \'on\' ? escape($__Context->foo, false) : $__Context->foo) ?>' + PHP_EOL . '$this->config->autoescape = \'off\';' . "\n" . 'echo ($this->config->autoescape === \'on\' ? escape($__Context->foo, false) : ($__Context->foo)) ?>' + ), + array( + '<config autoescape="off" />{$foo ? $foo : ""|auto}', + PHP_EOL . '$this->config->autoescape = \'off\';' . "\n" . 'echo ($this->config->autoescape === \'on\' ? escape($__Context->foo ? $__Context->foo : "", false) : ($__Context->foo ? $__Context->foo : "")) ?>' ), array( '<config autoescape="on" />{$foo|autoescape}',