diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php index 4e790d8..7b359de 100644 --- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php +++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php @@ -100,7 +100,7 @@ public function testEscaping($template, $expected) { ]); $twig->addExtension($this->systemUnderTest); - $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), TRUE), FALSE)); + $name = '__string_template_test__'; $nodes = $twig->parse($twig->tokenize(new \Twig_Source($template, $name))); $this->assertSame($expected, $nodes->getNode('body') @@ -155,7 +155,7 @@ public function testActiveTheme() { ->method('getActiveTheme') ->willReturn($active_theme); - $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), TRUE), FALSE)); + $name = '__string_template_test__'; $loader = new \Twig_Loader_Array([$name => '{{ active_theme() }}']); $twig = new \Twig_Environment($loader); $twig->addExtension($this->systemUnderTest); @@ -193,7 +193,7 @@ public function testActiveThemePath() { ->method('getActiveTheme') ->willReturn($active_theme); - $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), TRUE), FALSE)); + $name = '__string_template_test__'; $loader = new \Twig_Loader_Array([$name => '{{ active_theme_path() }}']); $twig = new \Twig_Environment($loader); $twig->addExtension($this->systemUnderTest); @@ -355,7 +355,7 @@ public function testRenderVarWithGeneratedLink() { * @covers ::createAttribute */ public function testCreateAttribute() { - $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), TRUE), FALSE)); + $name = '__string_template_test_1__'; $loader = new \Twig_Loader_Array([$name => "{% for iteration in iterations %}{% endfor %}"]); $twig = new \Twig_Environment($loader); $twig->addExtension($this->systemUnderTest); @@ -370,7 +370,7 @@ public function testCreateAttribute() { $this->assertEquals($expected, $result); // Test default creation of empty attribute object and using its method. - $name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), TRUE), FALSE)); + $name = '__string_template_test_2__'; $loader = new \Twig_Loader_Array(array($name => "")); $twig->setLoader($loader); $result = $twig->render($name);