Commit 1d749884 authored by alexpott's avatar alexpott

Issue #2336353 by cilefen: Fixed The message when there is no configuration to...

Issue #2336353 by cilefen: Fixed The message when there is no configuration to synchronize/import is misleading.
parent fcc5b623
......@@ -199,7 +199,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
'#type' => 'table',
'#header' => array('Name', 'Operations'),
'#rows' => array(),
'#empty' => $this->t('There are no configuration changes.'),
'#empty' => $this->t('There are no configuration changes to import.'),
);
$form['actions']['#access'] = FALSE;
return $form;
......
......@@ -193,7 +193,7 @@ public function testExportImportCollections() {
$this->drupalPostForm('admin/config/development/configuration/full/import', array('files[import_tarball]' => $filename), 'Upload');
// Verify that there are configuration differences to import.
$this->drupalGet('admin/config/development/configuration');
$this->assertNoText(t('There are no configuration changes.'));
$this->assertNoText(t('There are no configuration changes to import.'));
$this->assertText(t('!collection configuration collection', array('!collection' => 'collection.test1')));
$this->assertText(t('!collection configuration collection', array('!collection' => 'collection.test2')));
$this->assertText('config_test.create');
......@@ -210,7 +210,7 @@ public function testExportImportCollections() {
$this->assertLinkByHref('admin/config/development/configuration/sync/diff_collection/collection.test2/config_test.another_delete');
$this->drupalPostForm(NULL, array(), 'Import all');
$this->assertText(t('There are no configuration changes.'));
$this->assertText(t('There are no configuration changes to import.'));
// Test data in collections.
$data = $test1_storage->read('config_test.create');
......
......@@ -40,7 +40,7 @@ function testImport() {
$staging = $this->container->get('config.storage.staging');
$this->drupalGet('admin/config/development/configuration');
$this->assertText('There are no configuration changes.');
$this->assertText('There are no configuration changes to import.');
$this->assertNoFieldById('edit-submit', t('Import all'));
// Create updated configuration object.
......@@ -122,7 +122,7 @@ function testImport() {
$this->assertNoFieldById('edit-submit', t('Import all'));
// Verify that there are no further changes to import.
$this->assertText(t('There are no configuration changes.'));
$this->assertText(t('There are no configuration changes to import.'));
// Verify site name has changed.
$this->assertIdentical($new_site_name, \Drupal::config('system.site')->get('name'));
......@@ -223,7 +223,7 @@ function testImportLock() {
// Verify that there are configuration differences to import.
$this->drupalGet('admin/config/development/configuration');
$this->assertNoText(t('There are no configuration changes.'));
$this->assertNoText(t('There are no configuration changes to import.'));
// Acquire a fake-lock on the import mechanism.
$config_importer = $this->configImporter();
......@@ -313,7 +313,7 @@ public function testImportValidation() {
$this->prepareSiteNameUpdate($new_site_name);
$this->drupalGet('admin/config/development/configuration');
$this->assertNoText(t('There are no configuration changes.'));
$this->assertNoText(t('There are no configuration changes to import.'));
$this->drupalPostForm(NULL, array(), t('Import all'));
// Verify that the validation messages appear.
......@@ -388,14 +388,14 @@ function testImportErrorLog() {
$staging->write($name_secondary, $values_secondary);
// Verify that there are configuration differences to import.
$this->drupalGet('admin/config/development/configuration');
$this->assertNoText(t('There are no configuration changes.'));
$this->assertNoText(t('There are no configuration changes to import.'));
// Attempt to import configuration and verify that an error message appears.
$this->drupalPostForm(NULL, array(), t('Import all'));
$this->assertText(String::format('Deleted and replaced configuration entity "@name"', array('@name' => $name_secondary)));
$this->assertText(t('The configuration was imported with errors.'));
$this->assertNoText(t('The configuration was imported successfully.'));
$this->assertText(t('There are no configuration changes.'));
$this->assertText(t('There are no configuration changes to import.'));
}
}
......@@ -124,7 +124,7 @@ public function testConfigurationRename() {
// Run the import.
$this->drupalPostForm('admin/config/development/configuration', array(), t('Import all'));
$this->assertText(t('There are no configuration changes.'));
$this->assertText(t('There are no configuration changes to import.'));
$this->assertFalse(entity_load('node_type', $active_type), 'The content no longer exists with the old name.');
$content_type = entity_load('node_type', $staged_type);
......
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