public function HtmlTest::providerTestHtmlGetId in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::providerTestHtmlGetId()
Provides test data for testHtmlGetId().
Return value
array Test data.
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ HtmlTest.php, line 208 - Contains \Drupal\Tests\Component\Utility\HtmlTest.
Class
Namespace
Drupal\Tests\Component\UtilityCode
public function providerTestHtmlGetId() {
$id = 'abcdefghijklmnopqrstuvwxyz-0123456789';
return array(
// Verify that letters, digits, and hyphens are not stripped from the ID.
array(
$id,
$id,
),
// Verify that invalid characters are stripped from the ID.
array(
'invalididentifier',
'invalid,./:@\\^`{Üidentifier',
),
// Verify Drupal coding standards are enforced.
array(
'id-name-1',
'ID NAME_[1]',
),
// Verify that a repeated ID is made unique.
array(
'test-unique-id',
'test-unique-id',
),
array(
'test-unique-id',
'test-unique-id',
),
);
}