public function FilterTest::testInvalidFilterPathDueMissingMetaPrefixReferenceFieldWithMetaProperties in JSON:API 8.2
@covers ::queryCondition
File
- tests/
src/ Kernel/ Query/ FilterTest.php, line 95
Class
- FilterTest
- @coversDefaultClass \Drupal\jsonapi\Query\Filter @group jsonapi @group jsonapi_query @group legacy
Namespace
Drupal\Tests\jsonapi\Kernel\QueryCode
public function testInvalidFilterPathDueMissingMetaPrefixReferenceFieldWithMetaProperties() {
$this
->setExpectedException(CacheableBadRequestHttpException::class, 'Invalid nested filtering. The property `alt`, given in the path `photo.alt` belongs to the meta object of a relationship and must be preceded by `meta`.');
$resource_type = new ResourceType('node', 'painting', NULL);
Filter::createFromQueryParameter([
'photo.alt' => '',
], $resource_type, $this->fieldResolver);
}