function RedirectDestinationTest::testGetAsArray
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php \Drupal\Tests\Core\Routing\RedirectDestinationTest::testGetAsArray()
- 8.9.x core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php \Drupal\Tests\Core\Routing\RedirectDestinationTest::testGetAsArray()
- 10 core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php \Drupal\Tests\Core\Routing\RedirectDestinationTest::testGetAsArray()
@dataProvider providerGet
@covers ::getAsArray
File
-
core/
tests/ Drupal/ Tests/ Core/ Routing/ RedirectDestinationTest.php, line 90
Class
- RedirectDestinationTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Routing%21RedirectDestination.php/class/RedirectDestination/11.x" title="Provides helpers for redirect destinations." class="local">\Drupal\Core\Routing\RedirectDestination</a> @group Routing
Namespace
Drupal\Tests\Core\RoutingCode
public function testGetAsArray(Request $request, $expected_destination) : void {
$this->requestStack
->push($request);
$this->setupUrlGenerator();
// Call in twice in order to ensure it returns the same the next time.
$this->assertEquals([
'destination' => $expected_destination,
], $this->redirectDestination
->getAsArray());
$this->assertEquals([
'destination' => $expected_destination,
], $this->redirectDestination
->getAsArray());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.