function DevelTwigExtensionTest::testTwigExtensionLoaded

Same name in other branches
  1. 4.x tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::testTwigExtensionLoaded()
  2. 5.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\Kernel

Code

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.');
}