public function YamlFormArrayHelperTest::testToString in YAML Form 8
Tests converting arrays to readable string with YamlFormArrayHelper::toString().
@dataProvider providerToString
Parameters
array $array: The array to run through YamlFormArrayHelper::toString().
string $conjunction: The $conjunction to run through YamlFormArrayHelper::toString().
string $expected: The expected result from calling the function.
string $message: The message to display as output to the test.
See also
YamlFormArrayHelper::toString()
File
- tests/
src/ Unit/ YamlFormArrayHelperTest.php, line 33
Class
- YamlFormArrayHelperTest
- Tests form array utility.
Namespace
Drupal\Tests\yamlform\UnitCode
public function testToString(array $array, $conjunction, $expected, $message) {
$result = YamlFormArrayHelper::toString($array, $conjunction);
$this
->assertEquals($expected, $result, $message);
}