You are here

public function FilterTest::parameterProvider in JSON:API 8.2

Data provider for testCreateFromQueryParameter.

File

tests/src/Kernel/Query/FilterTest.php, line 314

Class

FilterTest
@coversDefaultClass \Drupal\jsonapi\Query\Filter @group jsonapi @group jsonapi_query @group legacy

Namespace

Drupal\Tests\jsonapi\Kernel\Query

Code

public function parameterProvider() {
  return [
    'shorthand' => [
      [
        'uid' => [
          'value' => 1,
        ],
      ],
      [
        [
          'path' => 'uid',
          'value' => 1,
          'operator' => '=',
        ],
      ],
    ],
    'extreme shorthand' => [
      [
        'uid' => 1,
      ],
      [
        [
          'path' => 'uid',
          'value' => 1,
          'operator' => '=',
        ],
      ],
    ],
  ];
}