function FormStateValuesTraitTest::providerSetValue
Provides data to 
      
    " class="local">self::testSetValue().
Return value
array[] Items are arrays of two items:
- The key for which to set a new value (string)
- The new value to set (mixed).
- The expected form state values after setting the new value (mixed[]).
File
- 
              core/tests/ Drupal/ Tests/ Core/ Form/ FormStateValuesTraitTest.php, line 131 
Class
- FormStateValuesTraitTest
- @coversDefaultClass \Drupal\Core\Form\FormStateValuesTrait[[api-linebreak]]
Namespace
Drupal\Tests\Core\FormCode
public function providerSetValue() {
  $data = [];
  $data[] = [
    'foo',
    'one',
    [
      'bar' => 'wrong',
      'foo' => 'one',
    ],
  ];
  $data[] = [
    [
      'bar',
      'baz',
    ],
    'two',
    [
      'bar' => [
        'baz' => 'two',
      ],
    ],
  ];
  $data[] = [
    [
      'foo',
      'bar',
      'baz',
    ],
    NULL,
    [
      'bar' => 'wrong',
      'foo' => [
        'bar' => [
          'baz' => NULL,
        ],
      ],
    ],
  ];
  return $data;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
