You are here

function VarnishTestCase::setUpVariables in Varnish 6

Same name and namespace in other branches
  1. 7 varnish.test \VarnishTestCase::setUpVariables()

Set up variables so that drupal sends out appropriate headers to Varnish.

1 call to VarnishTestCase::setUpVariables()
VarnishTestCase::setUp in ./varnish.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…

File

./varnish.test, line 35
Tests the basic functionality of Varnish.

Class

VarnishTestCase
Base class for Varnish Test Cases.

Code

function setUpVariables() {
  $variables = array(
    'cache' => 3,
    'cache_lifetime' => 900,
    'page_cache_max_age' => 1800,
  ) + $this->varnish_config;
  foreach ($variables as $key => $variable) {
    variable_set($key, $variable);
  }
  $this
    ->refreshVariables();
}