function SelectTest::providerNonArrayOperatorWithArrayValueCondition

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Database/SelectTest.php \Drupal\KernelTests\Core\Database\SelectTest::providerNonArrayOperatorWithArrayValueCondition()

Data provider for testNonArrayOperatorWithArrayValueCondition().

Return value

array[] Array of non array compatible operators and its value in the expected exception message.

File

core/tests/Drupal/KernelTests/Core/Database/SelectTest.php, line 603

Class

SelectTest
Tests the Select query builder.

Namespace

Drupal\KernelTests\Core\Database

Code

public static function providerNonArrayOperatorWithArrayValueCondition() {
  return [
    '=' => [
      '=',
      '=',
    ],
    '>' => [
      '>',
      '>',
    ],
    '<' => [
      '<',
      '<',
    ],
    '>=' => [
      '>=',
      '>=',
    ],
    '<=' => [
      '<=',
      '<=',
    ],
    'IS NULL' => [
      'IS NULL',
      'IS NULL',
    ],
    'IS NOT NULL' => [
      'IS NOT NULL',
      'IS NOT NULL',
    ],
    'Empty string' => [
      '',
      '=',
    ],
    'Not set' => [
      NULL,
      '=',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.