You are here

public function YamlFormTidyTest::providerTidy in YAML Form 8

Data provider for testTidy().

See also

testTidy()

File

tests/src/Unit/YamlFormTidyTest.php, line 40

Class

YamlFormTidyTest
Tests form tidy utility.

Namespace

Drupal\Tests\yamlform\Unit

Code

public function providerTidy() {
  $tests[] = [
    [
      'simple' => 'value',
    ],
    "simple: value",
  ];
  $tests[] = [
    [
      'returns' => "line 1\nline 2",
    ],
    "returns: |\n  line 1\n  line 2",
  ];
  $tests[] = [
    [
      'one two' => "line 1\nline 2",
    ],
    "'one two': |\n  line 1\n  line 2",
  ];
  $tests[] = [
    [
      'array' => [
        'one',
        'two',
      ],
    ],
    "array:\n  - one\n  - two",
  ];
  return $tests;
}