You are here

public function DefaultConfigurationTest::testDefaultConfigurationValues in Sidr: Accessible Mobile Menus 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Kernel/DefaultConfigurationTest.php \Drupal\Tests\sidr\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\sidr\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 sidr_theme.
  $sidr_theme = $config_factory
    ->get('sidr.settings')
    ->get('sidr_theme');

  // Checking if the sidr_theme variable value is dark.
  $this
    ->assertSame($sidr_theme, 'dark');
}