protected function DisableFieldTestTrait::checkIfFieldIsDisabledById in Disable Field 8.2
Check if the element with the given ID is disabled.
Parameters
string $id: The ID to check.
2 calls to DisableFieldTestTrait::checkIfFieldIsDisabledById()
- DisableFieldTest::testDisableFieldWithParagraphsField in tests/
src/ Functional/ DisableFieldTest.php - Test the disable_field module with a paragraphs field.
- DisableFieldTestTrait::checkIfFieldIsDisabledByFieldName in tests/
src/ Traits/ DisableFieldTestTrait.php - Check if the given field is disabled.
File
- tests/
src/ Traits/ DisableFieldTestTrait.php, line 49
Class
- DisableFieldTestTrait
- Provides methods to simplify checking if a field is disabled or not.
Namespace
Drupal\Tests\disable_field\TraitsCode
protected function checkIfFieldIsDisabledById(string $id) {
$this
->assertSession()
->elementExists('css', sprintf('#%s[disabled]', $id));
}