WebformElementIgnoredPropertiesTest.php in Webform 8.5
File
tests/src/Functional/Element/WebformElementIgnoredPropertiesTest.php
View source
<?php
namespace Drupal\Tests\webform\Functional\Element;
use Drupal\webform\Entity\Webform;
use Drupal\webform\Utility\WebformElementHelper;
class WebformElementIgnoredPropertiesTest extends WebformElementBrowserTestBase {
protected static $testWebforms = [
'test_element_ignored_properties',
];
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']);
}
}
}