You are here

function SkinrWebTestCase::assertNoSkinrClass in Skinr 8.2

Asserts that a class is not set for the given element id.

Parameters

$id: Id of the HTML element to check.

$class: The class name to check for.

$message: Message to display.

Return value

TRUE on pass, FALSE on fail.

File

src/Tests/skinr.test, line 44
Tests for the Skinr module.

Class

SkinrWebTestCase

Namespace

Drupal\tracker\Tests

Code

function assertNoSkinrClass($id, $class, $message = '') {
  $elements = $this
    ->xpath('//div[@id=:id]', array(
    ':id' => $id,
  ));
  $class_attr = (string) $elements[0]['class'];
  $this
    ->assertTrue(strpos($class_attr, $class) === FALSE, $message);
}