public function WebformArrayHelperTest::testInArray 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::testInArray()
Tests determining type of array with WebformArrayHelper::InArray().
@dataProvider providerInArray
Parameters
array $needles: The searched values.
array $haystack: The array.
string $expected: The expected result from calling the function.
See also
WebformArrayHelper::InArray()
File
- tests/
src/ Unit/ Utility/ WebformArrayHelperTest.php, line 97
Class
- WebformArrayHelperTest
- Tests webform array utility.
Namespace
Drupal\Tests\webform\Unit\UtilityCode
public function testInArray(array $needles, array $haystack, $expected) {
$result = WebformArrayHelper::InArray($needles, $haystack);
$this
->assertEquals($expected, $result);
}