summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2016-01-19 10:48:40 +0000
committerAlex Pott2016-01-19 10:48:40 +0000
commit6f17442770c5e0f4e79ab6bb264bc6522ac6cab1 (patch)
tree670dc80f78dad3edf5323fec4df99b4f561afc19
parentffb427aae7c34284a006cd2384acaea12c7b62f8 (diff)
Issue #2611064 by joshi.rohit100, Chi, dawehner: CronForm::submitForm - makes wrong redirect
-rw-r--r--core/modules/system/src/Form/CronForm.php1
-rw-r--r--core/modules/system/src/Tests/System/CronRunTest.php4
2 files changed, 4 insertions, 1 deletions
diff --git a/core/modules/system/src/Form/CronForm.php b/core/modules/system/src/Form/CronForm.php
index 3d66a14..63c6e8f 100644
--- a/core/modules/system/src/Form/CronForm.php
+++ b/core/modules/system/src/Form/CronForm.php
@@ -133,7 +133,6 @@ class CronForm extends FormBase {
drupal_set_message(t('Cron run failed.'), 'error');
}
- return new RedirectResponse($this->url('system.cron_settings', array(), array('absolute' => TRUE)));
}
}
diff --git a/core/modules/system/src/Tests/System/CronRunTest.php b/core/modules/system/src/Tests/System/CronRunTest.php
index e39e919..21deee3 100644
--- a/core/modules/system/src/Tests/System/CronRunTest.php
+++ b/core/modules/system/src/Tests/System/CronRunTest.php
@@ -109,6 +109,10 @@ class CronRunTest extends WebTestBase {
// fail randomly. Look for the word 'years', because without a timestamp,
// the time will start at 1 January 1970.
$this->assertNoText('years');
+
+ $this->drupalPostForm(NULL, [], t('Save configuration'));
+ $this->assertText(t('The configuration options have been saved.'));
+ $this->assertUrl('admin/config/system/cron');
}
/**