GraphQL\Tests\Type\SchemaValidatorTest::testRejectsSchemaWhichRedefinesBuiltInType PHP Method

testRejectsSchemaWhichRedefinesBuiltInType() public method

    public function testRejectsSchemaWhichRedefinesBuiltInType()
    {
        $FakeString = new CustomScalarType(['name' => 'String', 'serialize' => function () {
            return null;
        }]);
        $QueryType = new ObjectType(['name' => 'Query', 'fields' => ['normal' => ['type' => Type::string()], 'fake' => ['type' => $FakeString]]]);
        $this->expectFails(['query' => $QueryType], 'Schema must contain unique named types but contains multiple types named "String".');
    }
SchemaValidatorTest