function PreviewTest::assertClass
Same name in other branches
- 9 core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php \Drupal\Tests\views_ui\FunctionalJavascript\PreviewTest::assertClass()
- 8.9.x core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php \Drupal\Tests\views_ui\FunctionalJavascript\PreviewTest::assertClass()
- 11.x core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php \Drupal\Tests\views_ui\FunctionalJavascript\PreviewTest::assertClass()
Asserts that an element has a given class.
@internal
Parameters
\Behat\Mink\Element\NodeElement $element: The element to test.
string $class: The class to assert.
string $message: (optional) A verbose message to output.
1 call to PreviewTest::assertClass()
- PreviewTest::testPreviewWithPagersUI in core/
modules/ views_ui/ tests/ src/ FunctionalJavascript/ PreviewTest.php - Tests pagers in the preview form.
File
-
core/
modules/ views_ui/ tests/ src/ FunctionalJavascript/ PreviewTest.php, line 308
Class
- PreviewTest
- Tests the UI preview functionality.
Namespace
Drupal\Tests\views_ui\FunctionalJavascriptCode
protected function assertClass(NodeElement $element, string $class, string $message = '') : void {
if (!isset($message)) {
$message = "Class .{$class} found.";
}
$this->assertStringContainsString($class, $element->getAttribute('class'), $message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.