You are here

public function WebformArrayHelperTest::providerInArray in Webform 6.x

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/Utility/WebformArrayHelperTest.php \Drupal\Tests\webform\Unit\Utility\WebformArrayHelperTest::providerInArray()

Data provider for testInArray().

See also

testInArray()

File

tests/src/Unit/Utility/WebformArrayHelperTest.php, line 107

Class

WebformArrayHelperTest
Tests webform array utility.

Namespace

Drupal\Tests\webform\Unit\Utility

Code

public function providerInArray() {
  $tests[] = [
    [],
    [
      'A',
      'B',
      'C',
    ],
    FALSE,
  ];
  $tests[] = [
    [
      'A',
    ],
    [
      'A',
      'B',
      'C',
    ],
    TRUE,
  ];
  $tests[] = [
    [
      'A',
      'B',
    ],
    [
      'A',
      'B',
      'C',
    ],
    TRUE,
  ];
  $tests[] = [
    [
      'D',
    ],
    [
      'A',
      'B',
      'C',
    ],
    FALSE,
  ];
  $tests[] = [
    [
      1,
    ],
    [
      1,
      2,
      3,
    ],
    TRUE,
  ];
  $tests[] = [
    [
      4,
    ],
    [
      1,
      2,
      3,
    ],
    FALSE,
  ];
  return $tests;
}