protected function AttributeTest::assertNoClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Template/AttributeTest.php \Drupal\Tests\Core\Template\AttributeTest::assertNoClass()
Checks that the given CSS class is not present in the given HTML snippet.
Parameters
string $class: The CSS class to check.
string $html: The HTML snippet to check.
1 call to AttributeTest::assertNoClass()
- AttributeTest::testPrint in core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php - Tests printing of an attribute.
File
- core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php, line 400 - Contains \Drupal\Tests\Core\Template\AttributeTest.
Class
- AttributeTest
- @coversDefaultClass \Drupal\Core\Template\Attribute @group Template
Namespace
Drupal\Tests\Core\TemplateCode
protected function assertNoClass($class, $html) {
$xpath = "//*[@class='{$class}']";
self::assertFalse((bool) $this
->getXPathResultCount($xpath, $html));
}