function TrustedRedirectResponseTest::testSetTargetUrlWithInternalUrl
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php \Drupal\Tests\Core\Routing\TrustedRedirectResponseTest::testSetTargetUrlWithInternalUrl()
- 10 core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php \Drupal\Tests\Core\Routing\TrustedRedirectResponseTest::testSetTargetUrlWithInternalUrl()
- 11.x core/tests/Drupal/Tests/Core/Routing/TrustedRedirectResponseTest.php \Drupal\Tests\Core\Routing\TrustedRedirectResponseTest::testSetTargetUrlWithInternalUrl()
@covers ::setTargetUrl
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ TrustedRedirectResponseTest.php, line 23
Class
- TrustedRedirectResponseTest
- @coversDefaultClass \Drupal\Core\Routing\TrustedRedirectResponse @group Routing
Namespace
Drupal\Tests\Core\RoutingCode
public function testSetTargetUrlWithInternalUrl() {
$redirect_response = new TrustedRedirectResponse('/example');
$redirect_response->setTargetUrl('/example2');
$this->assertEquals('/example2', $redirect_response->getTargetUrl());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.