function HtmlTest::providerTestHtmlGetUniqueIdWithAjaxIds

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerTestHtmlGetUniqueIdWithAjaxIds()
  2. 8.9.x core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerTestHtmlGetUniqueIdWithAjaxIds()
  3. 10 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerTestHtmlGetUniqueIdWithAjaxIds()

Provides test data for testHtmlGetId().

Return value

array Test data.

File

core/tests/Drupal/Tests/Component/Utility/HtmlTest.php, line 184

Class

HtmlTest
Tests \Drupal\Component\Utility\Html.

Namespace

Drupal\Tests\Component\Utility

Code

public static function providerTestHtmlGetUniqueIdWithAjaxIds() {
    return [
        [
            'test-unique-id1--',
            'test-unique-id1',
        ],
        // Note, we truncate two hyphens at the end.
        // @see \Drupal\Component\Utility\Html::getId()
[
            'test-unique-id1---',
            'test-unique-id1--',
        ],
        [
            'test-unique-id2--',
            'test-unique-id2',
        ],
    ];
}

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