You are here

public function BambooTwigTokenTest::testSubstituteToken in Bamboo Twig 8.2

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

@covers Drupal\bamboo_twig_token\TwigExtension\Token::substituteToken

File

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

Class

BambooTwigTokenTest
Tests Token twig filters and functions.

Namespace

Drupal\Tests\bamboo_twig\Functional

Code

public function testSubstituteToken() {
  $this
    ->drupalGet('/bamboo-twig-token');
  $this
    ->assertElementPresent('.test-token div.token-site');
  $this
    ->assertElementContains('.test-token div.token-site', 'Drupal');
  $this
    ->assertElementPresent('.test-token div.token-node');
  $this
    ->assertElementContains('.test-token div.token-node', 'Hello, world!');
}