function ActiveLinkResponseFilterTest::testSetLinkActiveClass
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php \Drupal\Tests\Core\EventSubscriber\ActiveLinkResponseFilterTest::testSetLinkActiveClass()
- 10 core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php \Drupal\Tests\Core\EventSubscriber\ActiveLinkResponseFilterTest::testSetLinkActiveClass()
- 11.x core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php \Drupal\Tests\Core\EventSubscriber\ActiveLinkResponseFilterTest::testSetLinkActiveClass()
Tests setLinkActiveClass().
@dataProvider providerTestSetLinkActiveClass @covers ::setLinkActiveClass
Parameters
string $html_markup: The original HTML markup.
string $current_path: The system path of the currently active page.
bool $is_front: Whether the current page is the front page (which implies the current path might also be <front>).
string $url_language: The language code of the current URL.
array $query: The query string for the current URL.
string $expected_html_markup: The expected updated HTML markup.
File
-
core/
tests/ Drupal/ Tests/ Core/ EventSubscriber/ ActiveLinkResponseFilterTest.php, line 409
Class
- ActiveLinkResponseFilterTest
- @coversDefaultClass \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter @group EventSubscriber
Namespace
Drupal\Tests\Core\EventSubscriberCode
public function testSetLinkActiveClass($html_markup, $current_path, $is_front, $url_language, array $query, $expected_html_markup) {
$this->assertSame($expected_html_markup, ActiveLinkResponseFilter::setLinkActiveClass($html_markup, $current_path, $is_front, $url_language, $query));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.