You are here

protected function FeedsWebTestCase::assertFieldDisabled in Feeds 7.2

Asserts that a field in the current page is disabled.

Parameters

string $name: Name of field to assert.

string $message: (optional) A message to display with the assertion.

Return value

bool TRUE on pass, FALSE on fail.

3 calls to FeedsWebTestCase::assertFieldDisabled()
FeedsRSStoNodesTest::testClearInBackground in tests/feeds_processor_node.test
Tests clearing items in background.
FeedsRSStoNodesTest::testImportInBackground in tests/feeds_processor_node.test
Tests process in background option.
FeedsRSStoNodesTest::testUnlock in tests/feeds_processor_node.test
Tests unlocking a feed.

File

tests/feeds.test, line 507
Common functionality for all Feeds tests.

Class

FeedsWebTestCase
Test basic Data API functionality.

Code

protected function assertFieldDisabled($name, $message = '') {
  $elements = $this
    ->xpath($this
    ->constructFieldXpath('name', $name));
  return $this
    ->assertTrue(isset($elements[0]) && !empty($elements[0]['disabled']), $message ? $message : t('Field %name is disabled.', array(
    '%name' => $name,
  )), t('Browser'));
}