protected function TmgmtExtensionSuitTestBase::isFieldChecked in TMGMT Extension Suite 8.2
Same name and namespace in other branches
- 8.3 tests/src/Functional/TmgmtExtensionSuitTestBase.php \Drupal\Tests\tmgmt_extension_suit\Functional\TmgmtExtensionSuitTestBase::isFieldChecked()
Check if checkbox is checked.
Parameters
$id:
Return value
bool
File
- tests/
src/ Functional/ TmgmtExtensionSuitTestBase.php, line 73
Class
- TmgmtExtensionSuitTestBase
- Basic class for tmgmt extension module.
Namespace
Drupal\Tests\tmgmt_extension_suit\FunctionalCode
protected function isFieldChecked($id) {
$elements = $this
->xpath('//input[@id=:id]', [
':id' => $id,
]);
return isset($elements[0]) && !empty($elements[0]['checked']);
}