protected function ForumAccessBaseTestCase::assertFieldDisabled in Forum Access 7
Asserts that a field in the current page is disabled.
Parameters
$id: Id of field to assert.
$message: Message to display.
Return value
TRUE on pass, FALSE on fail.
1 call to ForumAccessBaseTestCase::assertFieldDisabled()
File
- tests/
forum_access_test_base.php, line 245 - Base class with auxiliary functions for forum access module tests.
Class
- ForumAccessBaseTestCase
- Base test class for the Forum Access module.
Code
protected function assertFieldDisabled($id, $message = '') {
$elements = $this
->xpath('//input[@id=:id]', array(
':id' => $id,
));
return $this
->assertTrue(isset($elements[0]) && !empty($elements[0]['disabled']), $message ? $message : t('Field @id is disabled.', array(
'@id' => $id,
)), t('Browser'));
}