function EntityConditionTest::queryParameterProvider

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::queryParameterProvider()
  2. 8.9.x core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::queryParameterProvider()
  3. 10 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 52

Class

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

Namespace

Drupal\Tests\jsonapi\Unit\Query

Code

public static 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',
                ],
            ],
        ],
    ];
}

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