You are here

public function FilterTest::parameterProvider in Drupal 8

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

Data provider for testCreateFromQueryParameter.

File

core/modules/jsonapi/tests/src/Kernel/Query/FilterTest.php, line 327

Class

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

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