Commit 5f6c72cb authored by bircher's avatar bircher

Issue #2857985: Disable tests as they will not work with config_filter...

Issue #2857985: Disable tests as they will not work with config_filter approach. (see issue 2857900)
parent cfa7bb83
......@@ -54,14 +54,15 @@ class ConfigIgnoreHookTest extends WebTestBase {
'import' => Yaml::encode($config->get()),
];
// Submit a new single item config, with the changes.
$this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
$this->drupalPostForm(NULL, [], t('Confirm'));
// Validate if the title from the imported config was rejected, due to the
// hook implemented in the `config_ignore_hook_test` module.
$this->drupalGet('<front>');
$this->assertText('Test import title');
// @TODO: Test the hook differently, single import is not ignored.
// // Submit a new single item config, with the changes.
// $this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
// $this->drupalPostForm(NULL, [], t('Confirm'));
//
// // Validate if the title from the imported config was rejected, due to the
// // hook implemented in the `config_ignore_hook_test` module.
// $this->drupalGet('<front>');
// $this->assertText('Test import title');
}
}
......@@ -53,16 +53,17 @@ class ConfigIgnoreTest extends WebTestBase {
'import' => Yaml::encode($config->get()),
];
// Submit a new single item config, with the changes.
$this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
$this->drupalPostForm(NULL, array(), t('Confirm'));
// Validate if the title from the imported config was rejected.
$this->assertText('Test import');
// Validate that the user gets a message about what has been ignored.
$this->assertText('The following config entity was ignored');
// @TODO: Test the hook differently, single import is not ignored.
// // Submit a new single item config, with the changes.
// $this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
//
// $this->drupalPostForm(NULL, array(), t('Confirm'));
//
// // Validate if the title from the imported config was rejected.
// $this->assertText('Test import');
//
// // Validate that the user gets a message about what has been ignored.
// $this->assertText('The following config entity was ignored');
}
......@@ -88,16 +89,17 @@ class ConfigIgnoreTest extends WebTestBase {
'import' => Yaml::encode($config->get()),
];
// Submit a new single item config, with the changes.
$this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
$this->drupalPostForm(NULL, array(), t('Confirm'));
// Validate if the title from the imported config was rejected.
$this->assertText('Test import');
// Validate that the user gets a message about what has been ignored.
$this->assertText('The following config entity was ignored');
// @TODO: Test the hook differently, single import is not ignored.
// // Submit a new single item config, with the changes.
// $this->drupalPostForm('admin/config/development/configuration/single/import', $edit, t('Import'));
//
// $this->drupalPostForm(NULL, array(), t('Confirm'));
//
// // Validate if the title from the imported config was rejected.
// $this->assertText('Test import');
//
// // Validate that the user gets a message about what has been ignored.
// $this->assertText('The following config entity was ignored');
}
......
......@@ -34,28 +34,30 @@ class ConfigIgnoreTest extends BrowserTestBase {
$this->config('system.site')->set('name', 'Test import')->save();
$this->config('system.date')->set('first_day', '0')->save();
$this->config('config_ignore.settings')->set('ignored_config_entities', ['system.site'])->save();
$destination = CONFIG_SYNC_DIRECTORY;
$destination_dir = config_get_config_directory($destination);
/** @var CachedStorage $source_storage */
$source_storage = \Drupal::service('config.storage');
$destination_storage = new FileStorage($destination_dir);
foreach ($source_storage->listAll() as $name) {
$destination_storage->write($name, $source_storage->read($name));
}
// Login with a user that has permission to sync. config.
$this->drupalLogin($this->drupalCreateUser(['synchronize configuration']));
// Change the site name, which is supposed to look as an ignored change
// in on the sync. page.
$this->config('system.site')->set('name', 'Test import with changed title')->save();
$this->config('system.date')->set('first_day', '1')->save();
// Validate that the sync. table informs the user that the config will be
// ignored.
$this->drupalGet('admin/config/development/configuration');
$this->assertSession()->responseContains('✔');
$this->assertSession()->responseContains('✖');
// @TODO: Test this differently, I am not sure this is the best way.
// $destination = CONFIG_SYNC_DIRECTORY;
// $destination_dir = config_get_config_directory($destination);
// /** @var CachedStorage $source_storage */
// $source_storage = \Drupal::service('config.storage');
// $destination_storage = new FileStorage($destination_dir);
// foreach ($source_storage->listAll() as $name) {
// $destination_storage->write($name, $source_storage->read($name));
// }
// @TODO: Test the ignored config differently, the table is not altered.
// // Login with a user that has permission to sync. config.
// $this->drupalLogin($this->drupalCreateUser(['synchronize configuration']));
//
// // Change the site name, which is supposed to look as an ignored change
// // in on the sync. page.
// $this->config('system.site')->set('name', 'Test import with changed title')->save();
// $this->config('system.date')->set('first_day', '1')->save();
//
// // Validate that the sync. table informs the user that the config will be
// // ignored.
// $this->drupalGet('admin/config/development/configuration');
// $this->assertSession()->responseContains('✔');
// $this->assertSession()->responseContains('✖');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment