You are here

protected function PagerTest::assertNoClass in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::assertNoClass()
  2. 9 core/modules/system/tests/src/Functional/Pager/PagerTest.php \Drupal\Tests\system\Functional\Pager\PagerTest::assertNoClass()

Asserts that an element does not have a given class.

@internal

Parameters

\Behat\Mink\Element\NodeElement $element: The element to test.

string $class: The class to assert.

string $message: (optional) A verbose message to output.

1 call to PagerTest::assertNoClass()
PagerTest::assertPagerItems in core/modules/system/tests/src/Functional/Pager/PagerTest.php
Asserts pager items and links.

File

core/modules/system/tests/src/Functional/Pager/PagerTest.php, line 346

Class

PagerTest
Tests pager functionality.

Namespace

Drupal\Tests\system\Functional\Pager

Code

protected function assertNoClass(NodeElement $element, string $class, string $message = NULL) : void {
  if (!isset($message)) {
    $message = "Class .{$class} not found.";
  }
  $this
    ->assertFalse($element
    ->hasClass($class), $message);
}