public function FormStateTest::providerTestGetRedirect in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Form/FormStateTest.php \Drupal\Tests\Core\Form\FormStateTest::providerTestGetRedirect()
Provides test data for testing the getRedirect() method.
Return value
array Returns some test data.
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ FormStateTest.php, line 43 - Contains \Drupal\Tests\Core\Form\FormStateTest.
Class
- FormStateTest
- @coversDefaultClass \Drupal\Core\Form\FormState
Namespace
Drupal\Tests\Core\FormCode
public function providerTestGetRedirect() {
$data = array();
$data[] = array(
array(),
NULL,
);
$redirect = new RedirectResponse('/example');
$data[] = array(
array(
'redirect' => $redirect,
),
$redirect,
);
$data[] = array(
array(
'redirect' => new Url('test_route_b', array(
'key' => 'value',
)),
),
new Url('test_route_b', array(
'key' => 'value',
)),
);
$data[] = array(
array(
'programmed' => TRUE,
),
NULL,
);
$data[] = array(
array(
'rebuild' => TRUE,
),
NULL,
);
$data[] = array(
array(
'no_redirect' => TRUE,
),
NULL,
);
return $data;
}