You are here

public function AuthcacheP13nTestConfigWidget::testConfigCacheMaxage in Authenticated User Page Caching (Authcache) 7.2

Cover authcache_p13n_config_cache_maxage().

File

modules/authcache_p13n/tests/authcache_p13n.config.test, line 54
Defines test for authcache personalization configuration widget.

Class

AuthcacheP13nTestConfigWidget
Tests for authcache_p13n_config element.

Code

public function testConfigCacheMaxage() {
  $tests = array(
    array(
      array(),
      0,
    ),
    array(
      array(
        'lifespan' => 60,
      ),
      60,
    ),
  );
  foreach ($tests as $pair) {
    list($config, $expect) = $pair;
    $result = authcache_p13n_config_cache_maxage($config);
    $this
      ->assertEqual($expect, $result);
  }
}