public function WebformYamlTest::testDecode in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Unit/Utility/WebformYamlTest.php \Drupal\Tests\webform\Unit\Utility\WebformYamlTest::testDecode()
Tests WebformYaml decode with WebformYaml::decode().
@dataProvider providerDecode
Parameters
string $yaml: The string to run through WebformYaml::decode().
string $expected: The expected result from calling the function.
See also
File
- tests/
src/ Unit/ Utility/ WebformYamlTest.php, line 81
Class
- WebformYamlTest
- Tests webform tidy utility.
Namespace
Drupal\Tests\webform\Unit\UtilityCode
public function testDecode($yaml, $expected) {
$result = WebformYaml::decode($yaml);
$this
->assertEquals($expected, $result);
}