You are here

public function WebformFormHelperTest::providerCleanupFormStateValues in Webform 8.5

Same name and namespace in other branches
  1. 6.x tests/src/Unit/Utility/WebformFormHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformFormHelperTest::providerCleanupFormStateValues()

Data provider for testCleanupFormStateValues().

See also

testCleanupFormStateValues()

File

tests/src/Unit/Utility/WebformFormHelperTest.php, line 41

Class

WebformFormHelperTest
Tests webform helper utility.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

public function providerCleanupFormStateValues() {
  $tests[] = [
    [
      'key' => 'value',
    ],
    [],
    [
      'key' => 'value',
    ],
  ];
  $tests[] = [
    [
      'key' => 'value',
      'form_token' => 'ignored',
    ],
    [],
    [
      'key' => 'value',
    ],
  ];
  $tests[] = [
    [
      'key' => 'value',
      'form_token' => 'ignored',
    ],
    [
      'key',
    ],
    [],
  ];
  return $tests;
}