public function WebformYamlTest::testEncode in Webform 6.x
Tests WebformYaml encode with WebformYaml::encode().
@dataProvider providerEncode
Parameters
string $yaml: The string to run through WebformYaml::encode().
string $expected: The expected result from calling the function.
See also
File
- tests/
src/ Unit/ Utility/ WebformYamlTest.php, line 143
Class
- WebformYamlTest
- Tests webform tidy utility.
Namespace
Drupal\Tests\webform\Unit\UtilityCode
public function testEncode($yaml, $expected) {
$result = WebformYaml::encode($yaml);
$this
->assertEquals($expected, $result);
}