You are here

protected function BambooTwigTestBase::debugOff in Bamboo Twig 8.5

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

Disables Twig debugging.

File

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

Class

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

Namespace

Drupal\Tests\bamboo_twig\Functional

Code

protected function debugOff() {

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