You are here

public function WebformElementHelperTest::testRemoveIgnoredProperties in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/Utility/WebformElementHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformElementHelperTest::testRemoveIgnoredProperties()

Tests WebformElementHelper::removeIgnoredProperties().

@dataProvider providerRemoveIgnoredProperties

Parameters

array $element: The array to run through WebformElementHelper::removeIgnoredProperties().

string $expected: The expected result from calling the function.

See also

WebformElementHelper::removeIgnoredProperties()

File

tests/src/Unit/Utility/WebformElementHelperTest.php, line 109

Class

WebformElementHelperTest
Tests webform element utility.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

public function testRemoveIgnoredProperties(array $element, $expected) {
  $result = WebformElementHelper::removeIgnoredProperties($element);
  $this
    ->assertEquals($expected, $result);
}