diff --git a/core/modules/views/src/Tests/Plugin/PluginBaseTest.php b/core/modules/views/src/Tests/Plugin/PluginBaseTest.php index 0ef1724..cb79434 100644 --- a/core/modules/views/src/Tests/Plugin/PluginBaseTest.php +++ b/core/modules/views/src/Tests/Plugin/PluginBaseTest.php @@ -44,6 +44,20 @@ public function testViewsTokenReplace() { } /** + * Test that the token replacement in views works correctly with dots. + */ + public function testViewsTokenReplaceWithDots() { + $text = '{{ argument.first }} comes before {{ argument.second }}'; + $tokens = ['{{ argument.first }}' => 'first', '{{ argument.second }}' => 'second']; + + $result = \Drupal::service('renderer')->executeInRenderContext(new RenderContext(), function () use ($text, $tokens) { + return $this->testPluginBase->viewsTokenReplace($text, $tokens); + }); + + $this->assertIdentical($result, 'first comes before second'); + } + + /** * Tests viewsTokenReplace without any twig tokens. */ public function testViewsTokenReplaceWithTwigTokens() {