function HtmxAttributesTest::testHxPushUrlAbsolute
Same name and namespace in other branches
- 11.x core/tests/Drupal/Tests/Core/Htmx/HtmxAttributesTest.php \Drupal\Tests\Core\Htmx\HtmxAttributesTest::testHxPushUrlAbsolute()
Test pushUrl method with a Url object.
File
-
core/
tests/ Drupal/ Tests/ Core/ Htmx/ HtmxAttributesTest.php, line 124
Class
- HtmxAttributesTest
- Test all attribute-related Htmx public methods.
Namespace
Drupal\Tests\Core\HtmxCode
public function testHxPushUrlAbsolute() : void {
$this->htmx
->pushUrl($this->url);
$render = $this->apply();
$this->assertStringEndsWith('/common-test/destination', $render['#attributes']['data-hx-push-url']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.