function DevelTwigExtensionTest::testXdebugIntegrationFunctionsRegistered
Same name in other branches
- 4.x tests/src/Kernel/DevelTwigExtensionTest.php \Drupal\Tests\devel\Kernel\DevelTwigExtensionTest::testXdebugIntegrationFunctionsRegistered()
Tests that the Twig function for XDebug integration is registered properly.
File
-
tests/
src/ Kernel/ DevelTwigExtensionTest.php, line 111
Class
- DevelTwigExtensionTest
- Tests Twig extensions.
Namespace
Drupal\Tests\devel\KernelCode
public function testXdebugIntegrationFunctionsRegistered() : void {
/** @var \Drupal\Core\Template\TwigEnvironment $environment */
$environment = $this->container
->get('twig');
$function = $environment->getFunction('devel_breakpoint');
$this->assertNotNull($function);
$this->assertTrue($function->needsContext());
$this->assertTrue($function->needsEnvironment());
$this->assertTrue($function->isVariadic());
is_callable($function->getCallable(), TRUE, $callable);
$this->assertEquals($callable, Debug::class . '::breakpoint');
}