function HtmxAttributesTest::testHxReplaceUrlAbsolute

Test replaceUrl method with a Url object.

File

core/tests/Drupal/Tests/Core/Htmx/HtmxAttributesTest.php, line 211

Class

HtmxAttributesTest
Test all attribute-related Htmx public methods.

Namespace

Drupal\Tests\Core\Htmx

Code

public function testHxReplaceUrlAbsolute() : void {
  $this->htmx
    ->replaceUrl($this->url);
  $render = $this->apply();
  $this->assertStringEndsWith('/common-test/destination', $render['#attributes']['data-hx-replace-url']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.