You are here

function FusionApplyDisplayTestCase::assertNoFusionApplyClass in Fusion Accelerator 7.2

Same name and namespace in other branches
  1. 7 fusion_apply/tests/fusion_apply.test \FusionApplyDisplayTestCase::assertNoFusionApplyClass()

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

fusion_apply/tests/fusion_apply.test, line 520
Tests for the Fusion Apply module.

Class

FusionApplyDisplayTestCase
Tests API functionality.

Code

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