protected function PagerTest::assertClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Pager/PagerTest.php \Drupal\system\Tests\Pager\PagerTest::assertClass()
Asserts that an element has a given class.
Parameters
\SimpleXMLElement $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/ src/ Tests/ Pager/ PagerTest.php - Asserts pager items and links.
File
- core/
modules/ system/ src/ Tests/ Pager/ PagerTest.php, line 218 - Contains \Drupal\system\Tests\Pager\PagerTest.
Class
- PagerTest
- Tests pager functionality.
Namespace
Drupal\system\Tests\PagerCode
protected function assertClass(\SimpleXMLElement $element, $class, $message = NULL) {
if (!isset($message)) {
$message = "Class .{$class} found.";
}
$this
->assertTrue(strpos($element['class'], $class) !== FALSE, $message);
}