function HelpTopicTwigLoaderTest::testGetSourceContextException
Same name in other branches
- 9 core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help_topics\Unit\HelpTopicTwigLoaderTest::testGetSourceContextException()
- 8.9.x core/modules/help_topics/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help_topics\Unit\HelpTopicTwigLoaderTest::testGetSourceContextException()
- 11.x core/modules/help/tests/src/Unit/HelpTopicTwigLoaderTest.php \Drupal\Tests\help\Unit\HelpTopicTwigLoaderTest::testGetSourceContextException()
@covers ::getSourceContext
File
-
core/
modules/ help/ tests/ src/ Unit/ HelpTopicTwigLoaderTest.php, line 81
Class
- HelpTopicTwigLoaderTest
- Unit test for the HelpTopicTwigLoader class.
Namespace
Drupal\Tests\help\UnitCode
public function testGetSourceContextException() : void {
$this->expectException(LoaderError::class);
$this->expectExceptionMessage("Malformed YAML in help topic \"vfs://root/modules/test/help_topics/test.invalid_yaml.html.twig\":");
$this->helpLoader
->getSourceContext('@' . HelpTopicTwigLoader::MAIN_NAMESPACE . '/test.invalid_yaml.html.twig');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.