protected function DrupalWebTestCase::assertFieldByName in SimpleTest 7.2
Same name and namespace in other branches
- 6.2 drupal_web_test_case.php \DrupalWebTestCase::assertFieldByName()
- 7 drupal_web_test_case.php \DrupalWebTestCase::assertFieldByName()
Asserts that a field exists in the current page with the given name and value.
Parameters
$name: Name of field to assert.
$value: Value of the field to assert.
$message: Message to display.
$group: The group this message belongs to.
Return value
TRUE on pass, FALSE on fail.
File
- ./
drupal_web_test_case.php, line 3100 - Provides DrupalTestCase, DrupalUnitTestCase, and DrupalWebTestCase classes.
Class
- DrupalWebTestCase
- Test case for typical Drupal tests.
Code
protected function assertFieldByName($name, $value = '', $message = '') {
return $this
->assertFieldByXPath($this
->constructFieldXpath('name', $name), $value, $message ? $message : t('Found field by name @name', array(
'@name' => $name,
)), t('Browser'));
}