function DrupalWebTestCase::assertField

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

Parameters

$field: Name or ID of field to assert.

$message: (optional) Message to display.

$group: The group this message belongs to.

Return value

TRUE on pass, FALSE on fail.

8 calls to DrupalWebTestCase::assertField()
CommentInterfaceTest::testCommentInterface in modules/comment/comment.test
Test comment interface.
DrupalWebTestCase::drupalLogout in modules/simpletest/drupal_web_test_case.php
ForumTestCase::doAdminTests in modules/forum/forum.test
Runs admin tests on the admin user.
ImportOPMLTestCase::openImportForm in modules/aggregator/aggregator.test
Opens OPML import form.
PollExpirationTestCase::testAutoExpire in modules/poll/poll.test

... See full list

File

modules/simpletest/drupal_web_test_case.php, line 3863

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.