public function BambooTwigRenderTest::testMenu in Bamboo Twig 8.5
Same name and namespace in other branches
- 8.2 tests/src/Functional/BambooTwigRenderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigRenderTest::testMenu()
- 8.3 tests/src/Functional/BambooTwigRenderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigRenderTest::testMenu()
- 8.4 tests/src/Functional/BambooTwigRenderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigRenderTest::testMenu()
@covers Drupal\bamboo_twig_loader\TwigExtension\Render::renderMenu
File
- tests/
src/ Functional/ BambooTwigRenderTest.php, line 305
Class
- BambooTwigRenderTest
- Tests Renders twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testMenu() {
$this
->drupalGet('/bamboo-twig-render');
$this
->assertSession()
->elementExists('css', '.test-render div.render-menu-no-access');
$this
->assertSession()
->elementNotExists('css', '.test-render div.render-menu-no-access ul');
$this
->drupalLogin($this->admin_user);
$this
->drupalGet('/bamboo-twig-render');
$this
->assertSession()
->elementExists('css', '.test-render div.render-menu-all');
$this
->assertElementCount('ul', 9, '.test-render div.render-menu-all');
$this
->assertElementCount('li', 25, '.test-render div.render-menu-all');
$this
->assertSession()
->elementExists('css', '.test-render div.render-menu-level');
$this
->assertElementCount('ul', 8, '.test-render div.render-menu-level');
$this
->assertElementCount('li', 24, '.test-render div.render-menu-level');
$this
->assertSession()
->elementExists('css', '.test-render div.render-menu-depth');
$this
->assertElementCount('ul', 2, '.test-render div.render-menu-depth');
$this
->assertElementCount('li', 3, '.test-render div.render-menu-depth');
}