You are here

public function FormSubmitterTest::providerTestRedirectWithUrl in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Form/FormSubmitterTest.php \Drupal\Tests\Core\Form\FormSubmitterTest::providerTestRedirectWithUrl()
  2. 9 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 169

Class

FormSubmitterTest
@coversDefaultClass \Drupal\Core\Form\FormSubmitter @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',
    ],
  ];
}