You are here

public function DefaultConfigurationTest::testDefaultConfigurationValues in Modules weight 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/DefaultConfigurationTest.php \Drupal\Tests\modules_weight\Kernel\DefaultConfigurationTest::testDefaultConfigurationValues()

Tests the default configuration values.

File

tests/src/Kernel/DefaultConfigurationTest.php, line 24

Class

DefaultConfigurationTest
Test the module configurations.

Namespace

Drupal\Tests\modules_weight\Kernel

Code

public function testDefaultConfigurationValues() {

  // Installing the configuration file.
  $this
    ->installConfig(self::$modules);

  // Getting the config factory service.
  $config_factory = $this->container
    ->get('config.factory');

  // Getting variable.
  $show_system_modules = $config_factory
    ->get('modules_weight.settings')
    ->get('show_system_modules');

  // Checking that the configuration variable is FALSE.
  $this
    ->assertFalse($show_system_modules, 'The default configuration value for show_system_modules should be FALSE.');
}