$this->fieldResolver =
$this->container->
get('jsonapi.field_resolver'
);
$this->resourceTypeRepository =
$this->container->
get('jsonapi.resource_type.repository'
);
} /**
* @covers ::queryCondition
*/
public function testInvalidFilterPathDueToMissingPropertyName() { $this->
expectException(CacheableBadRequestHttpException::
class);
$this->
expectExceptionMessage('Invalid nested filtering. The field `colors`, given in the path `colors` is incomplete, it must end with one of the following specifiers: `value`, `format`, `processed`.'
);
$resource_type =
$this->resourceTypeRepository->
get('node', 'painting'
);
Filter::
createFromQueryParameter(['colors' => ''
],
$resource_type,
$this->fieldResolver
);
} /**
* @covers ::queryCondition
*/
public function testInvalidFilterPathDueToMissingPropertyNameReferenceFieldWithMetaProperties() { $this->
expectException(CacheableBadRequestHttpException::
class);
$this->
expectExceptionMessage('Invalid nested filtering. The field `photo`, given in the path `photo` is incomplete, it must end with one of the following specifiers: `id`, `meta.drupal_internal__target_id`, `meta.alt`, `meta.title`, `meta.width`, `meta.height`.'
);
$resource_type =
$this->resourceTypeRepository->
get('node', 'painting'
);
Filter::
createFromQueryParameter(['photo' => ''
],
$resource_type,
$this->fieldResolver
);
}