protected function 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 drupal/core/modules/system/lib/Drupal/system/Tests/Pager/PagerTest.php
Asserts pager items and links.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Pager/PagerTest.php, line 148
Definition of Drupal\system\Tests\Pager\PagerTest.

Class

PagerTest
Tests pager functionality.

Namespace

Drupal\system\Tests\Pager

Code

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