You are here

public function WebformOptionsHelperTest::testEncodeConfig in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/Utility/WebformOptionsHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformOptionsHelperTest::testEncodeConfig()

Tests WebformOptionsHelper::encodeConfig().

@dataProvider providerEncodeConfig

Parameters

array $options: The options array to run through WebformOptionsHelper::encodeConfig().

string $expected: The expected result from calling the function.

See also

WebformOptionsHelper::encodeConfig()

File

tests/src/Unit/Utility/WebformOptionsHelperTest.php, line 167

Class

WebformOptionsHelperTest
Tests webform options utility.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

public function testEncodeConfig(array $options, $expected) {
  $result = WebformOptionsHelper::encodeConfig($options);
  $this
    ->assertEquals($expected, $result);
}