diff -u b/core/modules/system/lib/Drupal/system/Tests/Form/RedirectTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/RedirectTest.php --- b/core/modules/system/lib/Drupal/system/Tests/Form/RedirectTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/RedirectTest.php @@ -24,7 +24,7 @@ public static function getInfo() { return array( 'name' => 'Form redirecting', - 'description' => 'Tests functionality of form redirection.', + 'description' => 'Tests form redirection functionality.', 'group' => 'Form API', ); } @@ -103,7 +103,7 @@ $this->assertResponse(404); $this->drupalPostForm(NULL, array(), t('Submit')); $this->assertResponse(200); - $this->assertEqual($this->getUrl(), $expected, 'Redirected to correct url.'); + $this->assertEqual($this->getUrl(), $expected, 'Redirected to correct url/query.'); // Visit the block admin page (403 page) and submit the form. Verify it // ends up at the right URL. @@ -112,5 +112,5 @@ $this->drupalPostForm(NULL, array(), t('Submit')); $this->assertResponse(200); - $this->assertEqual($this->getUrl(), $expected, 'Redirected to correct url.'); + $this->assertEqual($this->getUrl(), $expected, 'Redirected to correct url/query.'); } } diff -u b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Plugin/Block/RedirectFormBlock.php b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Plugin/Block/RedirectFormBlock.php --- b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Plugin/Block/RedirectFormBlock.php +++ b/core/modules/system/tests/modules/form_test/lib/Drupal/form_test/Plugin/Block/RedirectFormBlock.php @@ -35,5 +35,5 @@ */ public function build() { - return drupal_get_form('Drupal\form_test\Form\RedirectBlockForm'); + return \Drupal::formBuilder()->getForm('Drupal\form_test\Form\RedirectBlockForm'); } }