public function TocFormatterTest::testConvertHeaderKeysToValues in TOC API 8
Tests converting header keys to list style type values with TocFormatter::convertHeaderKeysToValues().
@dataProvider providerConvertHeaderKeysToValues
Parameters
array $keys: The array to run through TocFormatter::convertHeaderKeysToValues().
array $options: The array to run through TocFormatter::convertHeaderKeysToValues().
string $expected: The expected result from calling the function.
See also
TocFormatter::convertHeaderKeysToValues()
File
- tests/
src/ Unit/ TocFormatterTest.php, line 129 - Contains \Drupal\Tests\toc_api\Unit\TocFormatterTest.
Class
- TocFormatterTest
- Tests TOC API formatter.
Namespace
Drupal\Tests\toc_api\UnitCode
public function testConvertHeaderKeysToValues(array $keys, array $options, $expected) {
$result = $this->formatter
->convertHeaderKeysToValues($keys, $options);
$this
->assertEquals($expected, $result);
}