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

File

modules/simpletest/tests/pager.test, line 152

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.