public function TocFilterOptionsTest::providerParseOptions in TOC filter 8.2
Data provider for testParseOptions().
See also
testParseOptions()
File
- tests/
src/ Unit/ TocFilterOptionsTest.php, line 44 - Contains \Drupal\Tests\toc_filter\Unit\TocFilterOptionsTest.
Class
- TocFilterOptionsTest
- Tests TOC filter formatter.
Namespace
Drupal\Tests\toc_filter\UnitCode
public function providerParseOptions() {
$tests[] = [
'value name=\'value\'',
[
'value' => TRUE,
'name' => 'value',
],
];
$tests[] = [
'one=\'value\' two=value three="value" four="value"',
[
'one' => 'value',
'two' => 'value',
'three' => 'value',
'four' => 'value',
],
];
$tests[] = [
'one=\'value\' two=value three="value" four="value"',
[
'one' => 'value',
'two' => 'value',
'three' => 'value',
'four' => 'value',
],
];
$tests[] = [
'one=1 two=2.0 three="3.3"',
[
'one' => 1,
'two' => 2,
'three' => 3.3,
],
];
$tests[] = [
'one=TRUE two=False three',
[
'one' => TRUE,
'two' => FALSE,
'three' => TRUE,
],
];
$tests[] = [
'parent_option.child_option=value',
[
'parent_option' => [
'child_option' => 'value',
],
],
];
$tests[] = [
'h2.number_type=decimal',
[
'headers' => [
'h2' => [
'number_type' => 'decimal',
],
],
],
];
return $tests;
}