You are here

public function WebformYamlTest::testDecode in Webform 8.5

Same name and namespace in other branches
  1. 6.x 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

WebformYaml::decode()

File

tests/src/Unit/Utility/WebformYamlTest.php, line 80

Class

WebformYamlTest
Tests webform tidy utility.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

public function testDecode($yaml, $expected) {
  $result = WebformYaml::decode($yaml);
  $this
    ->assertEquals($expected, $result);
}