diff --git a/core/lib/Drupal/Core/Form/FormBuilder.php b/core/lib/Drupal/Core/Form/FormBuilder.php index 46f1a2c..3698e5a 100644 --- a/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/core/lib/Drupal/Core/Form/FormBuilder.php @@ -922,7 +922,7 @@ public function redirectForm($form_state) { return; } - // Allow to use redirect responses directly if needed. + // Allow using redirect responses directly if needed. if (isset($form_state['redirect']) && $form_state['redirect'] instanceof RedirectResponse) { return $form_state['redirect']; } diff --git a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php index 16d49a9..b678b2d 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php @@ -13,8 +13,8 @@ use Drupal\Core\Session\AccountInterface; use Drupal\Tests\UnitTestCase; use Symfony\Component\DependencyInjection\ContainerInterface; - use Symfony\Component\HttpFoundation\RedirectResponse; - use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; /** * Tests the form builder. @@ -224,7 +224,7 @@ public function testRedirectWithResult($form_state, $result, $status = 302) { } /** - * Tests the redirectForm() with redirect_form when a redirect is expected. + * Tests the redirectForm() with redirect_route when a redirect is expected. * * @param array $form_state * An array of form state data to use for the redirect. @@ -239,8 +239,8 @@ public function testRedirectWithRouteWithResult($form_state, $result, $status = $this->urlGenerator->expects($this->once()) ->method('generateFromRoute') ->will($this->returnValueMap(array( - array('test_route_a', array(), array(), 'test-route'), - array('test_route_b', array('key' => 'value'), array(), 'test-route/value'), + array('test_route_a', array(), array('absolute' => TRUE), 'test-route'), + array('test_route_b', array('key' => 'value'), array('absolute' => TRUE), 'test-route/value'), )) );