public function BambooTwigRenderTest::testBlock 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::testBlock()
- 8.3 tests/src/Functional/BambooTwigRenderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigRenderTest::testBlock()
- 8.4 tests/src/Functional/BambooTwigRenderTest.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigRenderTest::testBlock()
@covers Drupal\bamboo_twig_loader\TwigExtension\Render::renderBlock
File
- tests/
src/ Functional/ BambooTwigRenderTest.php, line 68
Class
- BambooTwigRenderTest
- Tests Renders twig filters and functions.
Namespace
Drupal\Tests\bamboo_twig\FunctionalCode
public function testBlock() {
$this
->drupalGet('/bamboo-twig-render');
// Tests for Block Plugin.
$this
->assertSession()
->elementExists('css', '.test-render div.render-block-plugin');
$this
->assertElementContains('.test-render div.render-block-plugin', '<span>Powered by <a href="https://www.drupal.org">Drupal</a></span>');
// Tests for Block Entity.
$this
->assertSession()
->elementExists('css', '.test-render div.render-block-entity');
$this
->assertSession()
->elementExists('css', '.test-render div.render-block-entity #block-stark-branding');
}