You are here

protected function DrupalWebTestCase::assertField in SimpleTest 7.2

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

Asserts that a field exists with the given name or id.

Parameters

$field: Name or id of field to assert.

$message: Message to display.

$group: The group this message belongs to.

Return value

TRUE on pass, FALSE on fail.

1 call to DrupalWebTestCase::assertField()
DrupalWebTestCase::drupalLogout in ./drupal_web_test_case.php

File

./drupal_web_test_case.php, line 3236
Provides DrupalTestCase, DrupalUnitTestCase, and DrupalWebTestCase classes.

Class

DrupalWebTestCase
Test case for typical Drupal tests.

Code

protected function assertField($field, $message = '', $group = 'Other') {
  return $this
    ->assertFieldByXPath($this
    ->constructFieldXpath('name', $field) . '|' . $this
    ->constructFieldXpath('id', $field), NULL, $message, $group);
}