public function NodeElement::hasClass in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/behat/mink/src/Element/NodeElement.php \Behat\Mink\Element\NodeElement::hasClass()
Checks whether an element has a named CSS class.
Parameters
string $className Name of the class:
Return value
bool
File
- vendor/
behat/ mink/ src/ Element/ NodeElement.php, line 139
Class
- NodeElement
- Page element node.
Namespace
Behat\Mink\ElementCode
public function hasClass($className) {
if ($this
->hasAttribute('class')) {
return in_array($className, preg_split('/\\s+/', $this
->getAttribute('class')));
}
return false;
}