protected function FilterFormTest::assertEnabledTextarea in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/filter/src/Tests/FilterFormTest.php \Drupal\filter\Tests\FilterFormTest::assertEnabledTextarea()
Asserts that a textarea with a given ID exists and is not disabled.
Parameters
string $id: The HTML ID of the textarea.
Return value
bool TRUE if the assertion passed; FALSE otherwise.
2 calls to FilterFormTest::assertEnabledTextarea()
- FilterFormTest::doFilterFormTestAsAdmin in core/
modules/ filter/ src/ Tests/ FilterFormTest.php - Tests the behavior of the 'text_format' element as an administrator.
- FilterFormTest::doFilterFormTestAsNonAdmin in core/
modules/ filter/ src/ Tests/ FilterFormTest.php - Tests the behavior of the 'text_format' element as a normal user.
File
- core/
modules/ filter/ src/ Tests/ FilterFormTest.php, line 279 - Contains \Drupal\filter\Tests\FilterFormTest.
Class
- FilterFormTest
- Tests form elements with associated text formats.
Namespace
Drupal\filter\TestsCode
protected function assertEnabledTextarea($id) {
$textarea = $this
->xpath('//textarea[@id=:id and not(contains(@disabled, "disabled"))]', array(
':id' => $id,
));
$textarea = reset($textarea);
return $this
->assertTrue($textarea instanceof \SimpleXMLElement, SafeMarkup::format('Enabled field @id exists.', array(
'@id' => $id,
)));
}