GraphQL\Tests\Executor\UnionInterfaceTest::testExecutesUsingInterfaceTypes PHP Method

testExecutesUsingInterfaceTypes() public method

    public function testExecutesUsingInterfaceTypes()
    {
        // NOTE: This is an *invalid* query, but it should be an *executable* query.
        $ast = Parser::parse('
      {
        __typename
        name
        friends {
          __typename
          name
          woofs
          meows
        }
      }
        ');
        $expected = ['data' => ['__typename' => 'Person', 'name' => 'John', 'friends' => [['__typename' => 'Person', 'name' => 'Liz'], ['__typename' => 'Dog', 'name' => 'Odie', 'woofs' => true]]]];
        $this->assertEquals($expected, Executor::execute($this->schema, $ast, $this->john)->toArray());
    }