You are here

function FusionApplyUITestCase::assertNoFusionApplyClass in Fusion Accelerator 7.2

Same name and namespace in other branches
  1. 7 fusion_apply/tests/fusion_apply_ui.test \FusionApplyUITestCase::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_ui.test, line 90
Tests for the Fusion Apply UI module.

Class

FusionApplyUITestCase
Base class for Fusion Apply UI tests.

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