You are here

public function FormStateTest::providerTestSetValue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Form/FormStateTest.php \Drupal\Tests\Core\Form\FormStateTest::providerTestSetValue()

File

core/tests/Drupal/Tests/Core/Form/FormStateTest.php, line 246
Contains \Drupal\Tests\Core\Form\FormStateTest.

Class

FormStateTest
@coversDefaultClass \Drupal\Core\Form\FormState

Namespace

Drupal\Tests\Core\Form

Code

public function providerTestSetValue() {
  $data = array();
  $data[] = array(
    'foo',
    'one',
    array(
      'bar' => 'wrong',
      'foo' => 'one',
    ),
  );
  $data[] = array(
    array(
      'bar',
      'baz',
    ),
    'two',
    array(
      'bar' => array(
        'baz' => 'two',
      ),
    ),
  );
  $data[] = array(
    array(
      'foo',
      'bar',
      'baz',
    ),
    NULL,
    array(
      'bar' => 'wrong',
      'foo' => array(
        'bar' => array(
          'baz' => NULL,
        ),
      ),
    ),
  );
  return $data;
}