You are here

public function AuthcacheVarnishTestDefaultValidation::testNoValidationIfChecksAreDisabled in Authenticated User Page Caching (Authcache) 7.2

Ensure that no validation takes place when both mechanisms are turned off.

File

modules/authcache_varnish/authcache_varnish.test, line 366
Test cases for authcache_varnish module.

Class

AuthcacheVarnishTestDefaultValidation
Unit tests for authcache_varnish_request_validate().

Code

public function testNoValidationIfChecksAreDisabled() {

  // No validation if both checks are disabled.
  $this
    ->variableSet('authcache_varnish_validate_reverse_proxy_address', FALSE);
  $this
    ->variableSet('authcache_varnish_header', FALSE);
  $this
    ->assertIdentical(TRUE, authcache_varnish_request_validate(), 'Do not validate any headers when variables authcache_varnish_validate_reverse_proxy_address and authcache_varnish_header both are set to FALSE');
}