GraphQL\Tests\StarWarsIntrospectionTest::testAllowsQueryingForObjectFields PHP Méthode

testAllowsQueryingForObjectFields() public méthode

    public function testAllowsQueryingForObjectFields()
    {
        $query = '
        query IntrospectionDroidFieldsQuery {
          __type(name: "Droid") {
            name
            fields {
              name
              type {
                name
                kind
              }
            }
          }
        }
        ';
        $expected = ['__type' => ['name' => 'Droid', 'fields' => [['name' => 'id', 'type' => ['name' => null, 'kind' => 'NON_NULL']], ['name' => 'name', 'type' => ['name' => 'String', 'kind' => 'SCALAR']], ['name' => 'friends', 'type' => ['name' => null, 'kind' => 'LIST']], ['name' => 'appearsIn', 'type' => ['name' => null, 'kind' => 'LIST']], ['name' => 'secretBackstory', 'type' => ['name' => 'String', 'kind' => 'SCALAR']], ['name' => 'primaryFunction', 'type' => ['name' => 'String', 'kind' => 'SCALAR']]]]];
        $this->assertValidQuery($query, $expected);
    }