'#type' => 'more_link',
'#url' => Url::
fromRoute('router_test.1'
),
],
'expected' => '//div[@class="more-link"]/a[@href="' . Url::
fromRoute('router_test.1'
)->
toString() . '" and text()="More"]',
],
[ 'name' => "#type 'more_link' anchor tag with a route",
'value' =>
[ '#type' => 'more_link',
'#url' => Url::
fromRoute('router_test.1'
),
],
'expected' => '//div[@class="more-link"]/a[@href="' . \Drupal::
urlGenerator()->
generate('router_test.1'
) . '" and text()="More"]',
],
[ 'name' => "#type 'more_link' anchor tag with an absolute path",
'value' =>
[ '#type' => 'more_link',
'#url' => Url::
fromRoute('system.admin_content'
),
'#options' =>
['absolute' => TRUE
],
],
'expected' => '//div[@class="more-link"]/a[@href="' . Url::
fromRoute('system.admin_content'
)->
setAbsolute()->
toString() . '" and text()="More"]',
],
[