protected function MockingTrait::mockTypeResolver in GraphQL 8.4
Mock type resolver.
Parameters
string $type: Parent Type.
callable $resolver: Type resolver.
2 calls to MockingTrait::mockTypeResolver()
- TestFrameworkTest::testInterfaceMock in tests/
src/ Kernel/ Framework/ TestFrameworkTest.php - Test interface mocking.
- TestFrameworkTest::testUnionMock in tests/
src/ Kernel/ Framework/ TestFrameworkTest.php - Test union mocks.
File
- tests/
src/ Traits/ MockingTrait.php, line 212
Class
- MockingTrait
- Contains helpers for setting up mock servers and schemas for testing.
Namespace
Drupal\Tests\graphql\TraitsCode
protected function mockTypeResolver($type, callable $resolver) : void {
$this->registry
->addTypeResolver($type, $resolver);
}