You are here

public function FormSubmitterTest::providerTestRedirectWithUrl in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 167
Contains \Drupal\Tests\Core\Form\FormSubmitterTest.

Class

FormSubmitterTest
@coversDefaultClass \Drupal\Core\Form\FormSubmitter @group Form

Namespace

Drupal\Tests\Core\Form

Code

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