function HtmxAttributesTest::hxOnDataProvider
Provides data to ::testHxOn.
Return value
array<int, string[]> Array of event, expected.
File
-
core/
tests/ Drupal/ Tests/ Core/ Htmx/ HtmxAttributesTest.php, line 153
Class
- HtmxAttributesTest
- Test all attribute-related Htmx public methods.
Namespace
Drupal\Tests\Core\HtmxCode
public static function hxOnDataProvider() : array {
return [
[
'lowercase',
'data-hx-on-lowercase',
],
[
'already-kebab-case',
'data-hx-on-already-kebab-case',
],
[
'snake_case',
'data-hx-on-snake-case',
],
[
'camelCaseEvent',
'data-hx-on-camel-case-event',
],
[
'htmx:beforeRequest',
'data-hx-on-htmx-before-request',
],
[
'::beforeRequest',
'data-hx-on--before-request',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.