You are here

protected function PagerFunctionalWebTestCase::assertNoClass in Drupal 7

Asserts that an element does not have 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::assertNoClass()
PagerFunctionalWebTestCase::assertPagerItems in modules/simpletest/tests/pager.test
Asserts pager items and links.

File

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

Class

PagerFunctionalWebTestCase
Tests pager functionality.

Code

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