public function YamlFormTidyTest::testTidy in YAML Form 8
Tests YamlFormTidy tidy with YamlFormTidy::tidy().
@dataProvider providerTidy
Parameters
array $data: The array to run through YamlFormTidy::tidy().
string $expected: The expected result from calling the function.
See also
File
- tests/
src/ Unit/ YamlFormTidyTest.php, line 30
Class
- YamlFormTidyTest
- Tests form tidy utility.
Namespace
Drupal\Tests\yamlform\UnitCode
public function testTidy(array $data, $expected) {
$result = YamlFormTidy::tidy(Yaml::encode($data));
$this
->assertEquals($expected, $result);
}