function UrlTest::testGetRouteName
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::testGetRouteName()
- 10 core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::testGetRouteName()
- 9 core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::testGetRouteName()
- 8.9.x core/tests/Drupal/Tests/Core/UrlTest.php \Drupal\Tests\Core\UrlTest::testGetRouteName()
Tests the getRouteName() method.
Attributes
#[Depends('testUrlFromRequest')]
Parameters
\Drupal\Core\Url[] $urls: An array of Url objects.
File
-
core/
tests/ Drupal/ Tests/ Core/ UrlTest.php, line 370
Class
- UrlTest
- Tests Drupal\Core\Url.
Namespace
Drupal\Tests\CoreCode
public function testGetRouteName($urls) : void {
foreach ($urls as $index => $url) {
$this->assertSame($this->map[$index][0], $url->getRouteName());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.