function HtmxAttributesTest::testHxBoost
Test boost method.
Attributes
#[DataProvider('booleanStringDataProvider')]
File
-
core/
tests/ Drupal/ Tests/ Core/ Htmx/ HtmxAttributesTest.php, line 255
Class
- HtmxAttributesTest
- Test all attribute-related Htmx public methods.
Namespace
Drupal\Tests\Core\HtmxCode
public function testHxBoost(bool $value, string $expected) : void {
$this->htmx
->boost($value);
$render = $this->apply();
$this->assertTrue(isset($render['#attributes']['data-hx-boost']));
$this->assertEquals($expected, $render['#attributes']['data-hx-boost']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.