function EntityConditionTest::queryParameterProvider

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()
  2. 10 core/modules/jsonapi/tests/src/Unit/Query/EntityConditionTest.php \Drupal\Tests\jsonapi\Unit\Query\EntityConditionTest::queryParameterProvider()
  3. 11.x 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 <a href="/api/drupal/core%21modules%21jsonapi%21src%21Query%21EntityCondition.php/class/EntityCondition/8.9.x" title="A condition object for the EntityQuery." class="local">\Drupal\jsonapi\Query\EntityCondition</a> @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',
                ],
            ],
        ],
    ];
}

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