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