protected function DrupalWebTestCase::assertNoFieldChecked
Asserts that a checkbox field in the current page is not checked.
Parameters
$id: Id of field to assert.
$message: Message to display.
Return value
TRUE on pass, FALSE on fail.
22 calls to DrupalWebTestCase::assertNoFieldChecked()
- FormsRebuildTestCase::testRebuildPreservesValues in drupal-7.x/
modules/ simpletest/ tests/ form.test - Tests preservation of values.
- FormsRebuildTestCase::testRebuildPreservesValues in drupal-7.x/
modules/ simpletest/ tests/ form.test - Tests preservation of values.
- FormsTestCase::testRequiredCheckboxesRadio in drupal-7.x/
modules/ simpletest/ tests/ form.test - Tests validation for required checkbox, select, and radio elements.
- FormsTestCase::testRequiredCheckboxesRadio in drupal-7.x/
modules/ simpletest/ tests/ form.test - Tests validation for required checkbox, select, and radio elements.
- LocaleConfigurationTest::testLanguageConfiguration in drupal-7.x/
modules/ locale/ locale.test - Functional tests for adding, editing and deleting languages.
Archivo
- drupal-7.x/
modules/ simpletest/ drupal_web_test_case.php, line 3403
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Código
protected function assertNoFieldChecked($id, $message = '') {
$elements = $this->xpath('//input[@id=:id]', array(':id' => $id));
return $this->assertTrue(isset($elements[0]) && empty($elements[0]['checked']), $message ? $message : t('Checkbox field @id is not checked.', array('@id' => $id)), t('Browser'));
}