public function BambooTwigTokenTest::testSubstituteToken in Bamboo Twig 8.4
Same name and namespace in other branches
- 8.5 tests/src/Functional/BambooTwigTokenTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTokenTest::testSubstituteToken()
- 8.2 tests/src/Functional/BambooTwigTokenTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTokenTest::testSubstituteToken()
- 8.3 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 42
Class
- BambooTwigTokenTest
- Tests Token twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testSubstituteToken() {
$this
->drupalGet('/bamboo-twig-token');
$this
->assertElementContains('.test-token div.token-site', 'Drupal');
$this
->assertElementContains('.test-token div.token-node-1', 'News N°1');
$this
->assertElementContains('.test-token div.token-node-2', 'News N°2');
$this
->assertElementContains('.test-token div.token-node-3', 'News N°3');
$this
->assertElementContains('.test-token div.token-node-4', 'Article N°4');
$this
->assertElementContains('.test-token div.token-node-5', 'News N°5');
$this
->drupalGet('/fr/bamboo-twig-token');
$this
->assertElementContains('.test-token div.token-site', 'Drupal');
$this
->assertElementContains('.test-token div.token-node-1', 'News N°1');
$this
->assertElementContains('.test-token div.token-node-2', 'Article N°2');
$this
->assertElementContains('.test-token div.token-node-3', 'Article N°3');
$this
->assertElementContains('.test-token div.token-node-4', 'Article N°4');
$this
->assertElementContains('.test-token div.token-node-5', 'Article N°5');
$this
->drupalGet('/de/bamboo-twig-token');
$this
->assertElementContains('.test-token div.token-site', 'Drupal');
$this
->assertElementContains('.test-token div.token-node-1', 'News N°1');
$this
->assertElementContains('.test-token div.token-node-2', 'News N°2');
$this
->assertElementContains('.test-token div.token-node-3', 'Artikel N°3');
$this
->assertElementContains('.test-token div.token-node-4', 'Article N°4');
$this
->assertElementContains('.test-token div.token-node-5', 'News N°5');
}