You are here

public function EntityConditionTest::queryParameterProvider in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::queryParameterProvider()

Data provider for testDenormalize.

File

core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php, line 50

Class

EntityConditionTest
@coversDefaultClass \Drupal\jsonapi\Query\EntityCondition @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\Query

Code

public function queryParameterProvider() {
  return [
    [
      [
        'path' => 'some_field',
        'value' => NULL,
        'operator' => '=',
      ],
    ],
    [
      [
        'path' => 'some_field',
        'operator' => '=',
        'value' => 'some_string',
      ],
    ],
    [
      [
        'path' => 'some_field',
        'operator' => '<>',
        'value' => 'some_string',
      ],
    ],
    [
      [
        'path' => 'some_field',
        'operator' => 'NOT BETWEEN',
        'value' => 'some_string',
      ],
    ],
    [
      [
        'path' => 'some_field',
        'operator' => 'BETWEEN',
        'value' => [
          'some_string',
        ],
      ],
    ],
  ];
}