public function ResolverRegistryTest::testGetFieldResolverWithInheritanceTraversesMultipleInheritance in GraphQL 8.4
@covers ::getFieldResolverWithInheritance
File
- tests/
src/ Kernel/ ResolverRegistryTest.php, line 91
Class
- ResolverRegistryTest
- Tests that the resolver registry behaves correctly.
Namespace
Drupal\Tests\graphql\KernelCode
public function testGetFieldResolverWithInheritanceTraversesMultipleInheritance() : void {
$expected_resolver = $this->builder
->fromValue('Vehicle');
$this
->mockResolver('Vehicle', 'model', $expected_resolver);
$returned_resolver = $this->registry
->getFieldResolverWithInheritance($this->schema
->getSchema($this->registry)
->getType('Cabrio'), 'model');
self::assertEquals($expected_resolver, $returned_resolver);
}