function FormSubmitterTest::providerTestRedirectWithUrl

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::providerTestRedirectWithUrl()
  2. 10 core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::providerTestRedirectWithUrl()
  3. 9 core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::providerTestRedirectWithUrl()
  4. main core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::providerTestRedirectWithUrl()

Provides test data for testing the redirectForm() method with a route name.

Return value

array Returns some test data.

File

core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php, line 162

Class

FormSubmitterTest
@coversDefaultClass \Drupal\Core\Form\FormSubmitter[[api-linebreak]] @group Form

Namespace

Drupal\Tests\Core\Form

Code

public function providerTestRedirectWithUrl() {
  return [
    [
      new Url('test_route_a', [], [
        'absolute' => TRUE,
      ]),
      'test-route',
    ],
    [
      new Url('test_route_b', [
        'key' => 'value',
      ], [
        'absolute' => TRUE,
      ]),
      'test-route/value',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.