You are here

protected function TmgmtExtensionSuitTestBase::isFieldChecked in TMGMT Extension Suite 8

Check if checkbox is checked.

Parameters

$id:

Return value

bool

1 call to TmgmtExtensionSuitTestBase::isFieldChecked()
RequestBulkTranslationTest::testBulkSubmitTranslationPreselectTargetLanguage in src/Tests/RequestBulkTranslationTest.php
Check target language preselection.

File

src/Tests/TmgmtExtensionSuitTestBase.php, line 68

Class

TmgmtExtensionSuitTestBase
Basic class for tmgmt extension module.

Namespace

Drupal\tmgmt_extension_suit\Tests

Code

protected function isFieldChecked($id) {
  $elements = $this
    ->xpath('//input[@id=:id]', [
    ':id' => $id,
  ]);
  return isset($elements[0]) && !empty($elements[0]['checked']);
}