function EngineTwigTest::testRenderable

Same name in other branches
  1. 9 core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php \Drupal\Tests\system\Functional\Theme\EngineTwigTest::testRenderable()
  2. 8.9.x core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php \Drupal\Tests\system\Functional\Theme\EngineTwigTest::testRenderable()
  3. 11.x core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php \Drupal\Tests\system\Functional\Theme\EngineTwigTest::testRenderable()

Tests the rendering of renderables.

File

core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php, line 156

Class

EngineTwigTest
Tests Twig-specific theme functionality.

Namespace

Drupal\Tests\system\Functional\Theme

Code

public function testRenderable() : void {
    $this->drupalGet('/twig-theme-test/renderable');
    $this->assertSession()
        ->responseContains('<div>Example markup</div>');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.