function TrustedRedirectResponseTest::testSetTargetUrlWithInternalUrl
Tests set target url with internal url.
@legacy-covers ::setTargetUrl
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ TrustedRedirectResponseTest.php, line 31
Class
Namespace
Drupal\Tests\Core\RoutingCode
public function testSetTargetUrlWithInternalUrl() : void {
$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.