public function testIncludesInterfacesThunkSubtypesInTheTypeMap()
{
$someInterface = null;
$someSubtype = new ObjectType(['name' => 'SomeSubtype', 'fields' => ['f' => ['type' => Type::int()]], 'interfaces' => function () use(&$someInterface) {
return [$someInterface];
}, 'isTypeOf' => function () {
return true;
}]);
$someInterface = new InterfaceType(['name' => 'SomeInterface', 'fields' => ['f' => ['type' => Type::int()]]]);
$schema = new Schema(['query' => new ObjectType(['name' => 'Query', 'fields' => ['iface' => ['type' => $someInterface]]]), 'types' => [$someSubtype]]);
$this->assertSame($someSubtype, $schema->getType('SomeSubtype'));
}