public function WebformArrayHelperTest::providerIsAssociative in Webform 6.x
Same name and namespace in other branches
- 8.5 tests/src/Unit/Utility/WebformArrayHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformArrayHelperTest::providerIsAssociative()
Data provider for testIsAssociative().
See also
testIsAssociative()
File
- tests/
src/ Unit/ Utility/ WebformArrayHelperTest.php, line 72
Class
- WebformArrayHelperTest
- Tests webform array utility.
Namespace
Drupal\Tests\webform\Unit\UtilityCode
public function providerIsAssociative() {
$tests[] = [
[
'Jack',
],
FALSE,
];
$tests[] = [
[
0 => 'Jack',
1 => 'Jill',
],
FALSE,
];
$tests[] = [
[
0 => 'Jack',
2 => 'Jill',
],
TRUE,
];
$tests[] = [
[
'name' => 'Jack',
],
TRUE,
];
$tests[] = [
[
'Jack',
'name' => 'Jill',
],
TRUE,
];
$tests[] = [
[
'name' => 'Jack',
],
TRUE,
];
$tests[] = [
[
'name' => 'Jack',
'Jill',
],
TRUE,
];
return $tests;
}