public function RedirectDestinationTest::testGetAsArray in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Routing/RedirectDestinationTest.php \Drupal\Tests\Core\Routing\RedirectDestinationTest::testGetAsArray()
- 9 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 88
Class
- RedirectDestinationTest
- @coversDefaultClass \Drupal\Core\Routing\RedirectDestination @group Routing
Namespace
Drupal\Tests\Core\RoutingCode
public function testGetAsArray(Request $request, $expected_destination) {
$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());
}