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