You are here

private function NodeViewCountTestBase::setNodeviewcountSettings in Node view count 8

Set default nodeviewcount settings for tests.

1 call to NodeViewCountTestBase::setNodeviewcountSettings()
NodeViewCountTestBase::setUp in src/Tests/NodeViewCountTestBase.php

File

src/Tests/NodeViewCountTestBase.php, line 133

Class

NodeViewCountTestBase
Defines a base class for testing the nodeviewcount module.

Namespace

Drupal\nodeviewcount\Tests

Code

private function setNodeviewcountSettings() {
  $node_view_count_settings = $this
    ->config('nodeviewcount.settings');
  $node_view_count_settings
    ->set('user_roles', [
    'anonymous',
    'logged',
  ])
    ->set('excluded_user_roles', [
    'administrator',
  ])
    ->set('node_types', [
    'tracked_page',
  ])
    ->set('view_modes', [
    'full',
    'teaser',
  ])
    ->set('logs_life_time', 0)
    ->save();
}