public function BambooTwigLoaderTest::testCurrentUser in Bamboo Twig 8.4
Same name and namespace in other branches
- 8.5 tests/src/Functional/BambooTwigLoaderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigLoaderTest::testCurrentUser()
- 8.2 tests/src/Functional/BambooTwigLoaderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigLoaderTest::testCurrentUser()
- 8.3 tests/src/Functional/BambooTwigLoaderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigLoaderTest::testCurrentUser()
@covers Drupal\bamboo_twig_loader\TwigExtension\Loader::loadCurrentUser
File
- tests/
src/ Functional/ BambooTwigLoaderTest.php, line 68
Class
- BambooTwigLoaderTest
- Tests Loaders twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testCurrentUser() {
$this
->drupalGet('/bamboo-twig-loader');
$this
->assertElementPresent('.test-loaders div.loader-current-user');
$this
->assertElementContains('.test-loaders div.loader-current-user', '');
$this
->drupalLogin($this->admin_user);
$this
->drupalGet('/bamboo-twig-loader');
$this
->assertElementPresent('.test-loaders div.loader-current-user');
$this
->assertElementContains('.test-loaders div.loader-current-user', $this->admin_user
->getUsername());
}