You are here

protected function BambooTwigTestBase::debugOn in Bamboo Twig 8

Same name and namespace in other branches
  1. 8.5 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::debugOn()
  2. 8.2 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::debugOn()
  3. 8.3 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::debugOn()
  4. 8.4 tests/src/Functional/BambooTwigTestBase.php \Drupal\Tests\bamboo_twig\Functional\BambooTwigTestBase::debugOn()

Enables Twig debugging.

File

tests/src/Functional/BambooTwigTestBase.php, line 22

Class

BambooTwigTestBase
Has some additional helper methods to make test code more readable.

Namespace

Drupal\Tests\bamboo_twig\Functional

Code

protected function debugOn() {

  // Enable debug, rebuild the service container, and clear all caches.
  $parameters = $this->container
    ->getParameter('twig.config');
  if (!$parameters['debug']) {
    $parameters['debug'] = TRUE;
    $this
      ->setContainerParameter('twig.config', $parameters);
    $this
      ->rebuildContainer();
    $this
      ->resetAll();
  }
}