function ThemeRenderAndAutoescapeTest::testThemeEscapeAndRenderNotPrintable

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php \Drupal\KernelTests\Core\Theme\ThemeRenderAndAutoescapeTest::testThemeEscapeAndRenderNotPrintable()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php \Drupal\KernelTests\Core\Theme\ThemeRenderAndAutoescapeTest::testThemeEscapeAndRenderNotPrintable()
  3. 10 core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php \Drupal\KernelTests\Core\Theme\ThemeRenderAndAutoescapeTest::testThemeEscapeAndRenderNotPrintable()

Ensures invalid content is handled correctly.

File

core/tests/Drupal/KernelTests/Core/Theme/ThemeRenderAndAutoescapeTest.php, line 82

Class

ThemeRenderAndAutoescapeTest
Tests the theme_render_and_autoescape() function.

Namespace

Drupal\KernelTests\Core\Theme

Code

public function testThemeEscapeAndRenderNotPrintable() {
    $this->expectException(\Exception::class);
    theme_render_and_autoescape(new NonPrintable());
}

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