You are here

protected function BambooTwigTestBase::debugOn in Bamboo Twig 8.4

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

Enables Twig debugging.

File

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

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();
  }
}