public function WebformElementIgnoredPropertiesTest::testIgnoredProperties in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Functional/Element/WebformElementIgnoredPropertiesTest.php \Drupal\Tests\webform\Functional\Element\WebformElementIgnoredPropertiesTest::testIgnoredProperties()
Test element ignored properties.
File
- tests/
src/ Functional/ Element/ WebformElementIgnoredPropertiesTest.php, line 25
Class
- WebformElementIgnoredPropertiesTest
- Tests for element ignored properties.
Namespace
Drupal\Tests\webform\Functional\ElementCode
public function testIgnoredProperties() {
$webform_ignored_properties = Webform::load('test_element_ignored_properties');
$elements = $webform_ignored_properties
->getElementsInitialized();
$this
->assertArrayHasKey('textfield', $elements);
foreach (WebformElementHelper::$ignoredProperties as $ignored_property) {
$this
->assertArrayNotHasKey($ignored_property, $elements['textfield']);
}
}