public function WebformFormHelperTest::testCleanupFormStateValues in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Unit/Utility/WebformFormHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformFormHelperTest::testCleanupFormStateValues()
Tests WebformFormHelper::cleanupFormStateValues().
@dataProvider providerCleanupFormStateValues
Parameters
array $values: The array to run through WebformFormHelper::cleanupFormStateValues().
array $keys: (optional) An array of custom keys to be removed.
string $expected: The expected result from calling the function.
See also
WebformFormHelper::cleanupFormStateValues()
File
- tests/
src/ Unit/ Utility/ WebformFormHelperTest.php, line 31
Class
- WebformFormHelperTest
- Tests webform helper utility.
Namespace
Drupal\Tests\webform\Unit\UtilityCode
public function testCleanupFormStateValues(array $values, array $keys, $expected) {
$result = WebformFormHelper::cleanupFormStateValues($values, $keys);
$this
->assertEquals($expected, $result);
}