You are here

public function DevelTwigExtensionTest::testTwigExtensionLoaded in Devel 8

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::testTwigExtensionLoaded()
  2. 8.2 tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::testTwigExtensionLoaded()
  3. 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\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.');
}