public function DevelTwigExtensionTest::testTwigExtensionLoaded in Devel 8
Same name and namespace in other branches
- 8.3 tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::testTwigExtensionLoaded()
- 8.2 tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::testTwigExtensionLoaded()
- 4.x tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::testTwigExtensionLoaded()
Tests that Twig extension loads appropriately.
File
- tests/
src/ Kernel/ DevelTwigExtensionTest.php, line 71
Class
- DevelTwigExtensionTest
- Tests Twig extensions.
Namespace
Drupal\Tests\devel\KernelCode
public function testTwigExtensionLoaded() {
$twig_service = \Drupal::service('twig');
$extension = $twig_service
->getExtension(Debug::class);
$this
->assertEquals(get_class($extension), Debug::class, 'Debug Extension loaded successfully.');
}