You are here

public function ConfigIgnoreTest::testSettingsForm in Config Ignore 8.2

Same name and namespace in other branches
  1. 8.3 tests/src/Functional/ConfigIgnoreTest.php \Drupal\Tests\config_ignore\Functional\ConfigIgnoreTest::testSettingsForm()

Verify that the settings form works.

File

tests/src/Functional/ConfigIgnoreTest.php, line 59

Class

ConfigIgnoreTest
Test functionality of config_ignore module.

Namespace

Drupal\Tests\config_ignore\Functional

Code

public function testSettingsForm() {

  // Login with a user that has permission to import config.
  $this
    ->drupalLogin($this
    ->drupalCreateUser([
    'import configuration',
  ]));
  $edit = [
    'ignored_config_entities' => 'config.test_01' . "\r\n" . 'config.test_02',
  ];
  $this
    ->drupalGet('admin/config/development/configuration/ignore');
  $this
    ->submitForm($edit, $this
    ->t('Save configuration'));
  $settings = $this
    ->config('config_ignore.settings')
    ->get('ignored_config_entities');
  $this
    ->assertEquals([
    'config.test_01',
    'config.test_02',
  ], $settings);
}