GraphQL\Tests\Executor\VariablesTest::testNotWhenArgumentCannotBeCoerced PHP Méthode

testNotWhenArgumentCannotBeCoerced() public méthode

    public function testNotWhenArgumentCannotBeCoerced()
    {
        $ast = Parser::parse('{
            fieldWithDefaultArgumentValue(input: WRONG_TYPE)
        }');
        $expected = ['data' => ['fieldWithDefaultArgumentValue' => null], 'errors' => [['message' => 'Argument "input" got invalid value WRONG_TYPE.' . "\n" . 'Expected type "String", found WRONG_TYPE.', 'locations' => [['line' => 2, 'column' => 50]], 'path' => ['fieldWithDefaultArgumentValue']]]];
        $this->assertEquals($expected, Executor::execute($this->schema(), $ast)->toArray());
    }