You are here

public function HtmlTest::testHtmlClass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Component/Utility/HtmlTest.php \Drupal\Tests\Component\Utility\HtmlTest::testHtmlClass()

Tests that Html::getClass() cleans the class name properly.

@coversDefaultClass ::getClass

File

core/tests/Drupal/Tests/Component/Utility/HtmlTest.php, line 93
Contains \Drupal\Tests\Component\Utility\HtmlTest.

Class

HtmlTest
Tests \Drupal\Component\Utility\Html.

Namespace

Drupal\Tests\Component\Utility

Code

public function testHtmlClass() {

  // Verify Drupal coding standards are enforced.
  $this
    ->assertSame(Html::getClass('CLASS NAME_[Ü]'), 'class-name--ü', 'Enforce Drupal coding standards.');
}