From 49bac0b137ea7d8d8fc6d9c1bc5259cd8e7789a4 Mon Sep 17 00:00:00 2001 From: Andrej Hudec Date: Mon, 21 Jun 2021 21:35:52 +0200 Subject: [PATCH] Fix typo in CacheTokenParser.php --- extra/cache-extra/Tests/FunctionalTest.php | 4 ++-- extra/cache-extra/TokenParser/CacheTokenParser.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/cache-extra/Tests/FunctionalTest.php b/extra/cache-extra/Tests/FunctionalTest.php index ae8bd71f0..111026a89 100644 --- a/extra/cache-extra/Tests/FunctionalTest.php +++ b/extra/cache-extra/Tests/FunctionalTest.php @@ -53,7 +53,7 @@ class FunctionalTest extends TestCase { $twig = $this->createEnvironment(['index' => '{% cache "tags_no_args" tags() %}{% endcache %}']); $this->expectException(SyntaxError::class); - $this->expectExceptionMessage('The "ttl" modifier takes exactly one argument (0 given) in "index" at line 1.'); + $this->expectExceptionMessage('The "tags" modifier takes exactly one argument (0 given) in "index" at line 1.'); $twig->render('index'); } @@ -61,7 +61,7 @@ class FunctionalTest extends TestCase { $twig = $this->createEnvironment(['index' => '{% cache "tags_too_many_args" tags(["foo"], 1) %}{% endcache %}']); $this->expectException(SyntaxError::class); - $this->expectExceptionMessage('The "ttl" modifier takes exactly one argument (2 given) in "index" at line 1.'); + $this->expectExceptionMessage('The "tags" modifier takes exactly one argument (2 given) in "index" at line 1.'); $twig->render('index'); } diff --git a/extra/cache-extra/TokenParser/CacheTokenParser.php b/extra/cache-extra/TokenParser/CacheTokenParser.php index 953e44241..cb50b72d3 100644 --- a/extra/cache-extra/TokenParser/CacheTokenParser.php +++ b/extra/cache-extra/TokenParser/CacheTokenParser.php @@ -41,7 +41,7 @@ class CacheTokenParser extends AbstractTokenParser break; case 'tags': if (1 !== \count($args)) { - throw new SyntaxError(sprintf('The "ttl" modifier takes exactly one argument (%d given).', \count($args)), $stream->getCurrent()->getLine(), $stream->getSourceContext()); + throw new SyntaxError(sprintf('The "tags" modifier takes exactly one argument (%d given).', \count($args)), $stream->getCurrent()->getLine(), $stream->getSourceContext()); } $tags = $args->getNode(0); break;