/** * @expectedException Youshido\GraphQL\Exception\ConfigurationException */ public function testEnumConfig() { $enumType = new EnumType(['name' => 'Status', 'values' => [['name' => 'ACTIVE', 'values' => 1]]]); $object = new ObjectType(['name' => 'Project', 'fields' => ['id' => new IdType(), 'status' => $enumType]]); ConfigValidator::getInstance()->assertValidConfig($object->getConfig()); }
/** * @expectedException Youshido\GraphQL\Exception\ConfigurationException */ public function testInvalidFieldsParam() { $type = new ObjectType(['name' => 'SomeName', 'fields' => []]); ConfigValidator::getInstance()->assertValidConfig($type->getConfig()); }