reverted: --- b/core/lib/Drupal/Core/Template/TwigExtension.php +++ a/core/lib/Drupal/Core/Template/TwigExtension.php @@ -76,7 +76,6 @@ new \Twig_SimpleFunction('path', array($this, 'getPath'), array('is_safe_callback' => array($this, 'isUrlGenerationSafe'))), new \Twig_SimpleFunction('url_from_path', array($this, 'getUrlFromPath'), array('is_safe_callback' => array($this, 'isUrlGenerationSafe'))), new \Twig_SimpleFunction('link', array($this, 'getLink')), - new \Twig_SimpleFunction('file_url', 'file_create_url'), ); } reverted: --- b/core/modules/system/src/Tests/Theme/EngineTwigTest.php +++ a/core/modules/system/src/Tests/Theme/EngineTwigTest.php @@ -65,7 +65,7 @@ } /** + * Tests the link_generator twig functions. - * Tests the link_generator Twig functions. */ public function testTwigLinkGenerator() { $this->drupalGet('twig-theme-test/link-generator'); @@ -83,13 +83,4 @@ } } - /** - * Tests the file url Twig functions. - */ - public function testTwigFileUrls() { - $this->drupalGet('/twig-theme-test/file-url'); - $filepath = file_create_url('core/assets/vendor/jquery/jquery.js'); - $this->assertRaw('
file_url: ' . $filepath . '
'); - } - } reverted: --- b/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php +++ a/core/modules/system/tests/modules/twig_theme_test/src/TwigThemeTestController.php @@ -49,13 +49,4 @@ ); } - /** - * Renders for testing file_create_url functions in a Twig template. - */ - public function fileUrlRender() { - return array( - '#theme' => 'twig_theme_test_file_url', - ); - } - } reverted: --- b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module +++ a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.module @@ -33,10 +33,6 @@ 'variables' => array('test_url' => NULL), 'template' => 'twig_theme_test.link_generator', ); - $items['twig_theme_test_file_url'] = array( - 'variables' => array(), - 'template' => 'twig_theme_test.file_url', - ); return $items; } reverted: --- b/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.routing.yml +++ a/core/modules/system/tests/modules/twig_theme_test/twig_theme_test.routing.yml @@ -25,10 +25,3 @@ _controller: '\Drupal\twig_theme_test\TwigThemeTestController::linkGeneratorRender' requirements: _access: 'TRUE' - -twig_theme_test_file_url: - path: '/twig-theme-test/file-url' - defaults: - _controller: '\Drupal\twig_theme_test\TwigThemeTestController::fileUrlRender' - requirements: - _access: 'TRUE'