GraphQL\Tests\Type\EnumTypeTest::testMayBeInternallyRepresentedWithComplexValues PHP Метод

testMayBeInternallyRepresentedWithComplexValues() публичный Метод

    public function testMayBeInternallyRepresentedWithComplexValues()
    {
        $result = GraphQL::execute($this->schema, '{
        first: complexEnum
        second: complexEnum(fromEnum: TWO)
        good: complexEnum(provideGoodValue: true)
        bad: complexEnum(provideBadValue: true)
        }');
        $expected = ['data' => ['first' => 'ONE', 'second' => 'TWO', 'good' => 'TWO', 'bad' => null], 'errors' => [['message' => 'Expected a value of type "Complex" but received: instance of ArrayObject', 'locations' => [['line' => 5, 'column' => 9]]]]];
        $this->assertArraySubset($expected, $result);
    }