public function WebformArrayHelperTest::testToString in Webform 8.5
Same name and namespace in other branches
- 6.x tests/src/Unit/Utility/WebformArrayHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformArrayHelperTest::testToString()
Tests converting arrays to readable string with WebformArrayHelper::toString().
@dataProvider providerToString
Parameters
array $array: The array to run through WebformArrayHelper::toString().
string $conjunction: The $conjunction to run through WebformArrayHelper::toString().
string $expected: The expected result from calling the function.
See also
WebformArrayHelper::toString()
File
- tests/
src/ Unit/ Utility/ WebformArrayHelperTest.php, line 31
Class
- WebformArrayHelperTest
- Tests webform array utility.
Namespace
Drupal\Tests\webform\Unit\UtilityCode
public function testToString(array $array, $conjunction, $expected) {
$result = WebformArrayHelper::toString($array, $conjunction);
$this
->assertEquals($expected, $result);
}