You are here

public function EngineTwigTest::testTwigFileUrls in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php \Drupal\Tests\system\Functional\Theme\EngineTwigTest::testTwigFileUrls()
  2. 10 core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php \Drupal\Tests\system\Functional\Theme\EngineTwigTest::testTwigFileUrls()

Tests the automatic/magic calling of toString() on objects, if exists.

File

core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php, line 134

Class

EngineTwigTest
Tests Twig-specific theme functionality.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testTwigFileUrls() {
  $this
    ->drupalGet('/twig-theme-test/file-url');
  $filepath = file_url_transform_relative(file_create_url('core/modules/system/tests/modules/twig_theme_test/twig_theme_test.js'));
  $this
    ->assertRaw('<div>file_url: ' . $filepath . '</div>');
}