You are here

function SkinrWebTestCase::assertSkinrClass in Skinr 8.2

Asserts that a class is 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.

2 calls to SkinrWebTestCase::assertSkinrClass()
SkinrApiTestCase::testSkinrImplementsCache in src/Tests/skinr.test
Tests skinr_implements() caching and auto-loading.
SkinrDisplayTestCase::testSkinrDisplayed in src/Tests/skinr.test

File

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

Class

SkinrWebTestCase

Namespace

Drupal\tracker\Tests

Code

function assertSkinrClass($id, $class, $message = '') {
  $elements = $this
    ->xpath('//div[@id=:id and contains(@class, :class)]', array(
    ':id' => $id,
    ':class' => $class,
  ));
  $this
    ->assertTrue(!empty($elements[0]), $message);
}