You are here

protected function PagerFunctionalWebTestCase::assertClass in Drupal 7

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 PagerFunctionalWebTestCase::assertClass()
PagerFunctionalWebTestCase::assertPagerItems in modules/simpletest/tests/pager.test
Asserts pager items and links.

File

modules/simpletest/tests/pager.test, line 151
Tests for pager functionality.

Class

PagerFunctionalWebTestCase
Tests pager functionality.

Code

protected function assertClass(SimpleXMLElement $element, $class, $message = NULL) {
  if (!isset($message)) {
    $message = "Class .{$class} found.";
  }
  $this
    ->assertTrue(strpos($element['class'], $class) !== FALSE, $message);
}