public function FieldResolverTest::testResolveInternalEntityQueryPathError in JSON:API 8.2
Same name and namespace in other branches
- 8 tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::testResolveInternalEntityQueryPathError()
Expects an error when an invalid field is provided for filter and sort.
@covers ::resolveInternalEntityQueryPath @dataProvider resolveInternalEntityQueryPathErrorProvider
Parameters
string $entity_type: The entity type for which to test field resolution.
string $bundle: The entity bundle for which to test field resolution.
string $external_path: The external field path to resolve.
string $expected_message: (optional) An expected exception message.
File
- tests/
src/ Kernel/ Context/ FieldResolverTest.php, line 248
Class
- FieldResolverTest
- @coversDefaultClass \Drupal\jsonapi\Context\FieldResolver @group jsonapi @group legacy
Namespace
Drupal\Tests\jsonapi\Kernel\ContextCode
public function testResolveInternalEntityQueryPathError($entity_type, $bundle, $external_path, $expected_message = '') {
$this
->setExpectedException(CacheableBadRequestHttpException::class, $expected_message);
$this->sut
->resolveInternalEntityQueryPath($entity_type, $bundle, $external_path);
}