public function BambooTwigLoaderTest::testCurrentUser in Bamboo Twig 8.5
Same name and namespace in other branches
- 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()
- 8.4 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 70
Class
- BambooTwigLoaderTest
- Tests Loaders twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testCurrentUser() {
$this
->drupalGet('/bamboo-twig-loader');
$this
->assertSession()
->elementExists('css', '.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
->assertSession()
->elementExists('css', '.test-loaders div.loader-current-user');
$this
->assertElementContains('.test-loaders div.loader-current-user', $this->admin_user
->getAccountName());
}