function SkinrUITestCase::assertNoSkinrClass in Skinr 7.2
Same name and namespace in other branches
- 8.2 skinr_ui/src/Tests/skinr_ui.test \SkinrUITestCase::assertNoSkinrClass()
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 SkinrUITestCase::assertNoSkinrClass()
- SkinrContextUIBasicTestCase::testGroupList in skinr_context/
tests/ skinr_context_ui.test - Tests basic configuration and applying of a skin.
File
- tests/
skinr_ui.test, line 102 - Tests for the Skinr UI module.
Class
- SkinrUITestCase
- Base class for Skinr UI tests.
Code
function assertNoSkinrClass($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);
}