You are here

public function FilterTest::testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWithoutMetaProperties in JSON:API 8.2

@covers ::queryCondition

File

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

Class

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

Namespace

Drupal\Tests\jsonapi\Kernel\Query

Code

public function testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWithoutMetaProperties() {
  $this
    ->setExpectedException(CacheableBadRequestHttpException::class, 'Invalid nested filtering. The field `uid`, given in the path `uid` is incomplete, it must end with one of the following specifiers: `id`.');
  $resource_type = new ResourceType('node', 'painting', NULL);
  Filter::createFromQueryParameter([
    'uid' => '',
  ], $resource_type, $this->fieldResolver);
}