function SkinrUITestCase::assertSkinrClass in Skinr 8.2
Same name and namespace in other branches
- 7.2 tests/skinr_ui.test \SkinrUITestCase::assertSkinrClass()
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.
3 calls to SkinrUITestCase::assertSkinrClass()
- SkinrContextUIBasicTestCase::testGroupList in skinr_context/
tests/ skinr_context_ui.test - Tests basic configuration and applying of a skin.
- SkinrUIBasicTestCase::testSkinAdditionalEdit in skinr_ui/
src/ Tests/ skinr_ui.test - Tests access control for editing additional CSS classes.
- SkinrUIBasicTestCase::testSkinEdit in skinr_ui/
src/ Tests/ skinr_ui.test - Tests basic configuration and applying of a skin.
File
- skinr_ui/
src/ Tests/ skinr_ui.test, line 84 - Tests for the Skinr UI module.
Class
- SkinrUITestCase
- Base class for Skinr UI tests.
Code
function assertSkinrClass($id, $class, $message = '') {
$elements = $this
->xpath('//div[@id=:id]', array(
':id' => $id,
));
$class_attr = (string) $elements[0]['class'];
$this
->assertTrue(strpos($class_attr, ' ' . $class . ' '), $message);
}