function TwigExtensionTest::testTwigExtensionFunction
Same name in other branches
- 8.9.x core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php \Drupal\Tests\system\Functional\Theme\TwigExtensionTest::testTwigExtensionFunction()
- 10 core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php \Drupal\Tests\system\Functional\Theme\TwigExtensionTest::testTwigExtensionFunction()
- 11.x core/modules/system/tests/src/Functional/Theme/TwigExtensionTest.php \Drupal\Tests\system\Functional\Theme\TwigExtensionTest::testTwigExtensionFunction()
Tests that the Twig extension's function produces expected output.
File
-
core/
modules/ system/ tests/ src/ Functional/ Theme/ TwigExtensionTest.php, line 61
Class
- TwigExtensionTest
- Tests Twig extensions.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testTwigExtensionFunction() {
$this->config('system.theme')
->set('default', 'test_theme')
->save();
$this->drupalGet('twig-extension-test/function');
$this->assertSession()
->pageTextContains('THE QUICK BROWN BOX JUMPS OVER THE LAZY DOG 123.');
$this->assertSession()
->pageTextContains('the quick brown box jumps over the lazy dog 123.');
$this->assertSession()
->pageTextNotContains('The Quick Brown Fox Jumps Over The Lazy Dog 123.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.