You are here

public function NodeRevisionsAutocleanTest::testConfiguration in Node Revisions Autoclean 8

Test new configuration.

File

tests/src/Functional/NodeRevisionsAutocleanTest.php, line 251

Class

NodeRevisionsAutocleanTest
Class NodeRevisionsAutocleanTest.

Namespace

Drupal\Tests\node_revisions_autoclean\Functional

Code

public function testConfiguration() {
  $this
    ->initializeSettings(TRUE);
  $config = \Drupal::config('node_revisions_autoclean.settings');
  $this
    ->assertEquals('1', $config
    ->get('enable_on_cron'), 'Value for enable_on_cron ' . $config
    ->get('enable_on_cron'));
  $this
    ->assertEquals('1', $config
    ->get('enable_on_node_update'), 'Value for enable_on_node_update : ' . $config
    ->get('enable_on_node_update'));
  $this
    ->assertEquals('2', $config
    ->get('node.article'), 'Value for node.article : ' . $config
    ->get('node.article'));
  $this
    ->assertEquals('2', $config
    ->get('node.page'), 'Value for node.page : ' . $config
    ->get('node.page'));
  $this
    ->assertEquals('P1W', $config
    ->get('interval.article'), 'Value for interval.article : ' . $config
    ->get('interval.article'));
  $this
    ->assertEquals('0', $config
    ->get('interval.page'), 'Value for interval.page : ' . $config
    ->get('interval.page'));
}