minor #30279 [TwigBridge] Fix test (chalasr)
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBridge] Fix test
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
Commits
-------
ad752b1a48
[TwigBridge] Fix test
This commit is contained in:
commit
ede6c9d6b0
@ -54,7 +54,7 @@ class TransNodeTest extends TestCase
|
|||||||
protected function getVariableGetterWithStrictCheck($name)
|
protected function getVariableGetterWithStrictCheck($name)
|
||||||
{
|
{
|
||||||
if (Environment::MAJOR_VERSION >= 2) {
|
if (Environment::MAJOR_VERSION >= 2) {
|
||||||
return sprintf('(isset($context["%1$s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new %2$s(\'Variable "%1$s" does not exist.\', 0, $this->source); })())', $name, Environment::VERSION_ID >= 20700 ? '\Twig\Error\RuntimeError' : 'Twig_Error_Runtime');
|
return sprintf('(isset($context["%1$s"]) || array_key_exists("%1$s", $context) ? $context["%1$s"] : (function () { throw new %2$s(\'Variable "%1$s" does not exist.\', 0, $this->source); })())', $name, Environment::VERSION_ID >= 20700 ? 'RuntimeError' : 'Twig_Error_Runtime');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (\PHP_VERSION_ID >= 70000) {
|
if (\PHP_VERSION_ID >= 70000) {
|
||||||
|
Reference in New Issue
Block a user