protected function PreviewTest::assertClass in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php \Drupal\Tests\views_ui\FunctionalJavascript\PreviewTest::assertClass()
Asserts that an element has a given class.
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 302
Class
- PreviewTest
- Tests the UI preview functionality.
Namespace
Drupal\Tests\views_ui\FunctionalJavascriptCode
protected function assertClass(NodeElement $element, $class, $message = NULL) {
if (!isset($message)) {
$message = "Class .{$class} found.";
}
$this
->assertStringContainsString($class, $element
->getAttribute('class'), $message);
}