function SkinrWebTestBase::assertNoSkinrClass in Skinr 8.2
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
bool TRUE on pass, FALSE on fail.
File
- src/
Tests/ SkinrWebTestBase.php, line 45 - Contains \Drupal\skinr\Tests\SkinrWebTestBase.
Class
Namespace
Drupal\skinr\TestsCode
function assertNoSkinrClass($id, $class, $message = '') {
$elements = $this
->xpath('//div[@id=:id]', array(
':id' => $id,
));
$class_attr = (string) $elements[0]['class'];
$this
->assertTrue(strpos($class_attr, $class) === FALSE, $message);
}