function DrupalWebTestCase::assertNoFieldByName
Asserts that a field does not exist with the given name and value.
Parameters
$name: Name of field to assert.
$value: (optional) Value for the field, to assert that the field's value on the page doesn't match it. You may pass in NULL to skip checking the value, while still checking that the field doesn't exist. However, the default value ('') asserts that the field value is not an empty string.
$message: (optional) Message to display.
$group: The group this message belongs to.
Return value
TRUE on pass, FALSE on fail.
14 calls to DrupalWebTestCase::assertNoFieldByName()
- CommentAnonymous::testAnonymous in modules/
comment/ comment.test - Test anonymous comment functionality.
- CommentHelperCase::postComment in modules/
comment/ comment.test - Post comment.
- FieldFormTestCase::testFieldFormAccess in modules/
field/ tests/ field.test - Tests fields with no 'edit' access.
- FormsFormStorageTestCase::testImmutableForm in modules/
simpletest/ tests/ form.test - Verifies that form build-id is regenerated when loading an immutable form from the cache.
- FormValidationTestCase::testValidate in modules/
simpletest/ tests/ form.test - Tests form alterations by #element_validate, #validate, and form_set_value().
File
-
modules/
simpletest/ drupal_web_test_case.php, line 3739
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Code
protected function assertNoFieldByName($name, $value = '', $message = '') {
return $this->assertNoFieldByXPath($this->constructFieldXpath('name', $name), $value, $message ? $message : t('Did not find field by name @name', array(
'@name' => $name,
)), t('Browser'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.