You are here

public function ApeMinTest::initConfig in Advanced Page Expiration 8

Initialize various configurations post-installation.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container.

Overrides FunctionalTestSetupTrait::initConfig

File

src/Tests/ApeMinTest.php, line 35

Class

ApeMinTest
Test cache-control header is set correctly after minimal configuration.

Namespace

Drupal\ape\Tests

Code

public function initConfig(ContainerInterface $container) {
  parent::initConfig($container);
  $config = $container
    ->get('config.factory');
  $config
    ->getEditable('system.performance')
    ->set('cache.page.max_age', 2592000)
    ->save();
  $config
    ->getEditable('ape.settings')
    ->set('alternatives', '')
    ->set('exclusions', '')
    ->set('lifetime.alternatives', 60)
    ->set('lifetime.301', 1800)
    ->set('lifetime.302', 600)
    ->set('lifetime.404', 3600)
    ->save();
}