function TwigExtensionTest::testRenderMarkup
Tests output of MarkupInterface of TwigExtension->renderVar().
File
-
core/
modules/ system/ tests/ src/ Functional/ Theme/ TwigExtensionTest.php, line 148
Class
- TwigExtensionTest
- Tests Twig extensions.
Namespace
Drupal\Tests\system\Functional\ThemeCode
public function testRenderMarkup() : void {
/** @var \Drupal\Core\Template\TwigExtension $extension */
$extension = \Drupal::service('twig.extension');
$markup = Markup::create('<span>This is a MarkupInterface</span>');
$this->assertSame($markup, $extension->renderVar($markup));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.