You are here

public function BambooTwigFileTest::testUrlAbsolute in Bamboo Twig 8.2

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/BambooTwigFileTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigFileTest::testUrlAbsolute()
  2. 8.3 tests/src/Functional/BambooTwigFileTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigFileTest::testUrlAbsolute()
  3. 8.4 tests/src/Functional/BambooTwigFileTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigFileTest::testUrlAbsolute()

@covers Drupal\bamboo_twig_file\TwigExtension\File::UrlAbsolute

File

tests/src/Functional/BambooTwigFileTest.php, line 45

Class

BambooTwigFileTest
Tests File twig filters and functions.

Namespace

Drupal\Tests\bamboo_twig\Functional

Code

public function testUrlAbsolute() {
  $this
    ->drupalGet('/bamboo-twig-file');
  $this
    ->assertElementPresent('.test-files div.url-module-file-relative');
  $this
    ->assertElementContains('.test-files div.url-module-file-relative', '/modules/contrib/bamboo_twig/tests/modules/bamboo_twig_test/files/antistatique.jpg');
  $this
    ->assertElementPresent('.test-files div.url-module-file-absolute');
  $this
    ->assertElementContains('.test-files div.url-module-file-absolute', 'http://');
  $this
    ->assertElementContains('.test-files div.url-module-file-absolute', '/modules/contrib/bamboo_twig/tests/modules/bamboo_twig_test/files/antistatique.jpg');
}