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));
} /**
* Tests ActiveLinkResponseFilter only affects HTML responses.
*
* @covers ::onResponse
*/
public function testOnlyHtml() { $session =
new AnonymousUserSession();
$language_manager =
new LanguageManager(new LanguageDefault([]));
$request_stack =
new RequestStack();
$request_stack->
push(new Request());
$current_path_stack =
new CurrentPathStack($request_stack);
// Make sure path matcher isn't called and we didn't get to the link logic.
$path_matcher =
$this->
prophesize(PathMatcherInterface::
class);
$path_matcher->
isFrontPage()->
shouldNotBeCalled();
$subscriber =
new ActiveLinkResponseFilter( $session,
$current_path_stack,