function PagerTest::assertClass
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::assertClass()
- 10 core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::assertClass()
- 11.x core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::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 PagerTest::assertClass()
- PagerTest::assertPagerItems in core/
modules/ system/ tests/ src/ Functional/ Pager/ PagerTest.php - Asserts pager items and links.
File
-
core/
modules/ system/ tests/ src/ Functional/ Pager/ PagerTest.php, line 325
Class
- PagerTest
- Tests pager functionality.
Namespace
Drupal\Tests\system\Functional\PagerCode
protected function assertClass(NodeElement $element, $class, $message = NULL) {
if (!isset($message)) {
$message = "Class .{$class} found.";
}
$this->assertTrue($element->hasClass($class) !== FALSE, $message);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.