You are here

function SkinrWebTestCase::assertNoSkinrClass in Skinr 7.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.

1 call to SkinrWebTestCase::assertNoSkinrClass()
SkinrContextDisplayTestCase::testSkinrContextDisplayed in skinr_context/tests/skinr_context.test

File

tests/skinr.test, line 41
Tests for the Skinr module.

Class

SkinrWebTestCase
@file Tests for the Skinr module.

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