PHP Class GraphQL\Tests\Type\SchemaValidatorTest

Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: webonyx/graphql-php

Public Methods

Method Description
setUp ( )
testAcceptsASchemaThatSimplyHasAnInputTypeAsAFieldArg ( )
testAcceptsASchemaThatSimplyHasAnInputTypeAsAFieldArg2 ( ) Rule: NoOutputTypesAsInputArgs
testAcceptsAnObjectTypeWithFieldFunction ( )
testAcceptsAnObjectTypeWithFieldsObject ( )
testAcceptsSchemaWhoseQueryAndSubscriptionTypesAreObjectTypes ( )
testAcceptsSchemaWithListOfInputTypeAsInputFieldArg ( )
testAcceptsSchemaWithNonnullInputTypeAsInputFieldArg ( )
testAcceptsSchemaWithQueryAndMutationTypesOfObjectType ( )
testAcceptsSchemaWithQueryTypeOfObjectType ( )
testPassesOnTheIntrospectionSchema ( ) Type System Config
testRejectsASchemaThatUsesAnInputTypeAsAField ( )
testRejectsASchemaWithAListOfObjectsAsAnInputFieldArg ( )
testRejectsASchemaWithANonnullObjectAsAnInputFieldArg ( )
testRejectsASchemaWithAUnionTypeAsAnInputFieldArg ( )
testRejectsASchemaWithAnInterfaceTypeAsAnInputFieldArg ( )
testRejectsASchemaWithAnObjectTypeAsAnInputFieldArg ( )
testRejectsSchemaWhichDefinesObjectTypeTwice ( )
testRejectsSchemaWhichHaveSameNamedObjectsImplementingInterface ( )
testRejectsSchemaWhichRedefinesBuiltInType ( )
testRejectsSchemaWhoseDirectivesAreIncorrectlyTyped ( )
testRejectsSchemaWhoseMutationTypeIsInputType ( )
testRejectsSchemaWhoseQueryTypeIsAnInputType ( )
testRejectsSchemaWhoseSubscriptionTypeIsInputType ( )
testRejectsSchemaWithoutQueryType ( )
testRejectsWhenAPossibleTypeDoesNotImplementTheInterface ( )

Private Methods

Method Description
assertAcceptingFieldArgOfType ( $fieldArgType )
assertRejectingFieldArgOfType ( $fieldArgType )
checkValidationResult ( $validationErrors, $operationType )
expectFails ( $schemaConfig, $error )
expectPasses ( $schemaConfig )
expectRejectionBecauseFieldIsNotInputType ( $errors, $fieldTypeName )
expectToAcceptSchemaWithNormalInputArg ( $rule )
schemaWithFieldArgOfType ( $argType )
schemaWithFieldType ( $type )
withModifiers ( $types )

Method Details

setUp() public method

public setUp ( )

testAcceptsASchemaThatSimplyHasAnInputTypeAsAFieldArg() public method

testAcceptsASchemaThatSimplyHasAnInputTypeAsAFieldArg2() public method

Rule: NoOutputTypesAsInputArgs

testAcceptsAnObjectTypeWithFieldFunction() public method

testAcceptsAnObjectTypeWithFieldsObject() public method

testAcceptsSchemaWhoseQueryAndSubscriptionTypesAreObjectTypes() public method

testAcceptsSchemaWithListOfInputTypeAsInputFieldArg() public method

testAcceptsSchemaWithNonnullInputTypeAsInputFieldArg() public method

testAcceptsSchemaWithQueryAndMutationTypesOfObjectType() public method

testAcceptsSchemaWithQueryTypeOfObjectType() public method

testPassesOnTheIntrospectionSchema() public method

Type System Config

testRejectsASchemaThatUsesAnInputTypeAsAField() public method

testRejectsASchemaWithAListOfObjectsAsAnInputFieldArg() public method

testRejectsASchemaWithANonnullObjectAsAnInputFieldArg() public method

testRejectsASchemaWithAUnionTypeAsAnInputFieldArg() public method

testRejectsASchemaWithAnInterfaceTypeAsAnInputFieldArg() public method

testRejectsASchemaWithAnObjectTypeAsAnInputFieldArg() public method

testRejectsSchemaWhichDefinesObjectTypeTwice() public method

testRejectsSchemaWhichHaveSameNamedObjectsImplementingInterface() public method

testRejectsSchemaWhichRedefinesBuiltInType() public method

testRejectsSchemaWhoseDirectivesAreIncorrectlyTyped() public method

testRejectsSchemaWhoseMutationTypeIsInputType() public method

testRejectsSchemaWhoseQueryTypeIsAnInputType() public method

testRejectsSchemaWhoseSubscriptionTypeIsInputType() public method

testRejectsSchemaWithoutQueryType() public method

testRejectsWhenAPossibleTypeDoesNotImplementTheInterface() public method