You are here

protected function DrupalWebTestCase::assertFieldById in SimpleTest 6.2

Same name and namespace in other branches
  1. 7.2 drupal_web_test_case.php \DrupalWebTestCase::assertFieldById()
  2. 7 drupal_web_test_case.php \DrupalWebTestCase::assertFieldById()

Asserts that a field exists in the current page with the given id and value.

Parameters

$id: Id 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 2804

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function assertFieldById($id, $value = '', $message = '') {
  return $this
    ->assertFieldByXPath($this
    ->constructFieldXpath('id', $id), $value, $message ? $message : t('Found field by id @id', array(
    '@id' => $id,
  )), t('Browser'));
}