function HtmxAttributesTest::apply

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Htmx/HtmxAttributesTest.php \Drupal\Tests\Core\Htmx\HtmxAttributesTest::apply()

Applies the Htmx attributes to a render array.

13 calls to HtmxAttributesTest::apply()
HtmxAttributesTest::testHxBoost in core/tests/Drupal/Tests/Core/Htmx/HtmxAttributesTest.php
Test boost method.
HtmxAttributesTest::testHxHeaders in core/tests/Drupal/Tests/Core/Htmx/HtmxAttributesTest.php
Test headers method.
HtmxAttributesTest::testHxOn in core/tests/Drupal/Tests/Core/Htmx/HtmxAttributesTest.php
Test on method.
HtmxAttributesTest::testHxPushUrl in core/tests/Drupal/Tests/Core/Htmx/HtmxAttributesTest.php
Test pushUrl method.
HtmxAttributesTest::testHxPushUrlAbsolute in core/tests/Drupal/Tests/Core/Htmx/HtmxAttributesTest.php
Test pushUrl method with a Url object.

... See full list

File

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

Class

HtmxAttributesTest
Test all attribute-related Htmx public methods.

Namespace

Drupal\Tests\Core\Htmx

Code

protected function apply() : array {
  $render = [];
  $this->htmx
    ->applyTo($render);
  return $render;
}

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