diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 5ecb86f..7163b2b 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -6,13 +6,15 @@ on:
jobs:
setup:
timeout-minutes: 15
+
runs-on: ${{ matrix.os }}
+
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ '8.2', '8.3' ]
- laravel: [ 10.* ]
+ laravel: ['10.*', '11.*']
stability: [ prefer-lowest, prefer-stable ]
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
diff --git a/composer.json b/composer.json
index ad001b0..345d78d 100644
--- a/composer.json
+++ b/composer.json
@@ -4,23 +4,23 @@
"type": "project",
"require": {
"php": "^8.2",
- "illuminate/support": "^10.0",
+ "illuminate/support": "^10.0|^11.0",
"jawira/case-converter": "^3.5",
- "symfony/config": "^6.0",
- "symfony/console": "^6.1",
- "symfony/dependency-injection": "^6.0",
- "symfony/filesystem": "^6.4",
- "symfony/http-kernel": "^6.0",
- "symplify/autowire-array-parameter": "^11.0",
- "symplify/package-builder": "^11.0",
- "thecodingmachine/safe": "^2.4",
- "webonyx/graphql-php": "^15.0.1"
+ "symfony/config": "^6.4|^7.0",
+ "symfony/console": "^6.4|^7.0",
+ "symfony/dependency-injection": "^6.4|^7.0",
+ "symfony/filesystem": "^6.4|^7.0",
+ "symfony/http-kernel": "^6.4|^7.0",
+ "symplify/autowire-array-parameter": "^11.1",
+ "symplify/package-builder": "^11.3",
+ "thecodingmachine/safe": "^2.5",
+ "webonyx/graphql-php": "^15.14"
},
"require-dev": {
"pestphp/pest": "^2.34",
- "symfony/var-dumper": "^6.4",
- "symplify/easy-testing": "^11.0",
- "worksome/coding-style": "^2.10.2"
+ "symfony/finder": "^6.4|^7.0",
+ "symfony/var-dumper": "^6.4|^7.0",
+ "worksome/coding-style": "^2.11"
},
"license": "MIT",
"autoload": {
diff --git a/phpunit.xml b/phpunit.xml
index f368d59..6d03a8b 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -10,9 +10,9 @@
./tests
-
+
+
diff --git a/test-resources/Inspections/CamelCaseFieldInspectionTest/snake_case_field.graphql.inc b/test-resources/Inspections/CamelCaseFieldInspectionTest/snake_case_field.graphql.inc
index c3f937e..742268f 100644
--- a/test-resources/Inspections/CamelCaseFieldInspectionTest/snake_case_field.graphql.inc
+++ b/test-resources/Inspections/CamelCaseFieldInspectionTest/snake_case_field.graphql.inc
@@ -1,7 +1,3 @@
type User {
full_name: String!
}
------
-type User {
- fullName: String!
-}
diff --git a/test-resources/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest/input_without_suffix.graphql.inc b/test-resources/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest/input_without_suffix.graphql.inc
index c999220..bf82eb8 100644
--- a/test-resources/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest/input_without_suffix.graphql.inc
+++ b/test-resources/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest/input_without_suffix.graphql.inc
@@ -1,7 +1,3 @@
input User {
fullName: String!
}
------
-input UserInput {
- fullName: String!
-}
diff --git a/test-resources/Inspections/ModelDirectiveRequiresIdFieldInspectionTest/model_directive_type_without_id_field.graphql.inc b/test-resources/Inspections/ModelDirectiveRequiresIdFieldInspectionTest/model_directive_type_without_id_field.graphql.inc
index f8d763a..3e1fec9 100644
--- a/test-resources/Inspections/ModelDirectiveRequiresIdFieldInspectionTest/model_directive_type_without_id_field.graphql.inc
+++ b/test-resources/Inspections/ModelDirectiveRequiresIdFieldInspectionTest/model_directive_type_without_id_field.graphql.inc
@@ -1,8 +1,3 @@
type User @model {
name: String!
}
------
-type User @model {
- id: ID!
- name: String!
-}
diff --git a/test-resources/Inspections/MutationFieldArgumentNamedInputInspectionTest/mutation_field_argument_named_something.graphql.inc b/test-resources/Inspections/MutationFieldArgumentNamedInputInspectionTest/mutation_field_argument_named_something.graphql.inc
index 957da25..b5280d0 100644
--- a/test-resources/Inspections/MutationFieldArgumentNamedInputInspectionTest/mutation_field_argument_named_something.graphql.inc
+++ b/test-resources/Inspections/MutationFieldArgumentNamedInputInspectionTest/mutation_field_argument_named_something.graphql.inc
@@ -1,8 +1,3 @@
type Mutation {
version(environment: String!): String!
}
-
------
-type Mutation {
- version(input: String!): String!
-}
diff --git a/test-resources/Inspections/NonNullableIdInspectionTest/nullable_id_field.graphql.inc b/test-resources/Inspections/NonNullableIdInspectionTest/nullable_id_field.graphql.inc
index 9d269dc..9b0fcd6 100644
--- a/test-resources/Inspections/NonNullableIdInspectionTest/nullable_id_field.graphql.inc
+++ b/test-resources/Inspections/NonNullableIdInspectionTest/nullable_id_field.graphql.inc
@@ -1,8 +1,3 @@
type Person {
id: ID
}
-
------
-type Person {
- id: ID!
-}
diff --git a/test-resources/Inspections/NonNullableInsideListInspectionTest/nullable_inside_list_field.graphql.inc b/test-resources/Inspections/NonNullableInsideListInspectionTest/nullable_inside_list_field.graphql.inc
index a1f9997..6d76c81 100644
--- a/test-resources/Inspections/NonNullableInsideListInspectionTest/nullable_inside_list_field.graphql.inc
+++ b/test-resources/Inspections/NonNullableInsideListInspectionTest/nullable_inside_list_field.graphql.inc
@@ -1,8 +1,3 @@
type Person {
friends: [Person]!
}
-
------
-type Person {
- friends: [Person!]!
-}
diff --git a/test-resources/Inspections/NonNullableListInspectionTest/nullable_field_list.graphql.inc b/test-resources/Inspections/NonNullableListInspectionTest/nullable_field_list.graphql.inc
index 06e3c46..a559a5f 100644
--- a/test-resources/Inspections/NonNullableListInspectionTest/nullable_field_list.graphql.inc
+++ b/test-resources/Inspections/NonNullableListInspectionTest/nullable_field_list.graphql.inc
@@ -1,8 +1,3 @@
type Person {
friends: [Person]
}
-
------
-type Person {
- friends: [Person]!
-}
diff --git a/test-resources/Inspections/PascalCaseObjectTypeDefinitionInspectionTest/snake_case_type.graphql.inc b/test-resources/Inspections/PascalCaseObjectTypeDefinitionInspectionTest/snake_case_type.graphql.inc
index d266cd3..0c5c49d 100644
--- a/test-resources/Inspections/PascalCaseObjectTypeDefinitionInspectionTest/snake_case_type.graphql.inc
+++ b/test-resources/Inspections/PascalCaseObjectTypeDefinitionInspectionTest/snake_case_type.graphql.inc
@@ -1,7 +1,3 @@
type user_information {
fullName: String!
}
------
-type UserInformation {
- fullName: String!
-}
diff --git a/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/camel_case_multi_word_enum_case.graphql.inc b/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/camel_case_multi_word_enum_case.graphql.inc
index 59eb420..e72ea1b 100644
--- a/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/camel_case_multi_word_enum_case.graphql.inc
+++ b/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/camel_case_multi_word_enum_case.graphql.inc
@@ -1,7 +1,3 @@
enum Status {
inProgress
}
------
-enum Status {
- IN_PROGRESS
-}
diff --git a/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/lower_snake_case_enum_case.graphql.inc b/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/lower_snake_case_enum_case.graphql.inc
index f08b412..47d0462 100644
--- a/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/lower_snake_case_enum_case.graphql.inc
+++ b/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/lower_snake_case_enum_case.graphql.inc
@@ -1,7 +1,3 @@
enum Status {
in_progress
}
------
-enum Status {
- IN_PROGRESS
-}
diff --git a/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/pascal_case_enum_case.graphql.inc b/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/pascal_case_enum_case.graphql.inc
index 98f8d39..ba48e91 100644
--- a/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/pascal_case_enum_case.graphql.inc
+++ b/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/pascal_case_enum_case.graphql.inc
@@ -1,7 +1,3 @@
enum Status {
Active
}
------
-enum Status {
- ACTIVE
-}
diff --git a/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/pascal_case_multi_word_enum_case.graphql.inc b/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/pascal_case_multi_word_enum_case.graphql.inc
index dae7129..960be8b 100644
--- a/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/pascal_case_multi_word_enum_case.graphql.inc
+++ b/test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/pascal_case_multi_word_enum_case.graphql.inc
@@ -1,7 +1,3 @@
enum Status {
InProgress
}
------
-enum Status {
- IN_PROGRESS
-}
diff --git a/tests/.pest/snapshots/Feature/Inspections/CamelCaseFieldInspectionTest/it_can_rename_field_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/CamelCaseFieldInspectionTest/it_can_rename_field_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..703ae22
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/CamelCaseFieldInspectionTest/it_can_rename_field_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+type User {
+ fullName: String!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___10___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___10___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..386017c
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___10___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,4 @@
+enum Some {
+ "A test"
+ TEST
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___11___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___11___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..2c63584
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___11___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,4 @@
+"Input for a user"
+input UserInput {
+ name: String!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___12___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___12___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..8f601b1
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___12___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1 @@
+scalar something
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..9300c54
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1 @@
+union Pro = User | Company
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..0d28cee
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,4 @@
+"Allowed cakes"
+enum Cake {
+ CHOCOLATE
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..541235e
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1 @@
+interface Admin
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___5___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___5___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..08ba028
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___5___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1 @@
+type User
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___6___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___6___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..ace1cd6
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___6___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,4 @@
+"Some user"
+type User {
+ name: String!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___8___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___8___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..ed07555
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DescriptionRequiredInspectionTest/it_can_require_description_with_data_set___Symfony_Component_Finder_SplFileInfo___8___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1 @@
+input Something
diff --git a/tests/.pest/snapshots/Feature/Inspections/DisallowEnumInspectionTest/it_can_disallow_enums_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/DisallowEnumInspectionTest/it_can_disallow_enums_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..f2a6b0f
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/DisallowEnumInspectionTest/it_can_disallow_enums_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,4 @@
+enum MyEnum {
+ GOOD
+ BAD
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest/it_can_rename_input_object_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest/it_can_rename_input_object_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..3a56d64
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest/it_can_rename_input_object_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+input UserInput {
+ fullName: String!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/ModelDirectiveRequiresIdFieldInspectionTest/it_can_disallow_enums_with_data_set___Symfony_Component_Finder_SplFileInfo____Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/ModelDirectiveRequiresIdFieldInspectionTest/it_can_disallow_enums_with_data_set___Symfony_Component_Finder_SplFileInfo____Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..0d4298d
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/ModelDirectiveRequiresIdFieldInspectionTest/it_can_disallow_enums_with_data_set___Symfony_Component_Finder_SplFileInfo____Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,4 @@
+type User @model {
+ id: ID!
+ name: String!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/MutationFieldArgumentNamedInputInspectionTest/it_can_rename_argument_field_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/MutationFieldArgumentNamedInputInspectionTest/it_can_rename_argument_field_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..76f270d
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/MutationFieldArgumentNamedInputInspectionTest/it_can_rename_argument_field_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+type Mutation {
+ version(input: String!): String!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/NonNullableIdInspectionTest/it_can_make_id_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/NonNullableIdInspectionTest/it_can_make_id_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..65db32a
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/NonNullableIdInspectionTest/it_can_make_id_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+type Person {
+ id: ID!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/NonNullableInsideListInspectionTest/it_can_make_type_inside_list_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/NonNullableInsideListInspectionTest/it_can_make_type_inside_list_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..125a028
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/NonNullableInsideListInspectionTest/it_can_make_type_inside_list_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+type Person {
+ friends: [Person!]!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/NonNullableListInspectionTest/it_can_make_list_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/NonNullableListInspectionTest/it_can_make_list_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..6d76c81
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/NonNullableListInspectionTest/it_can_make_list_non_null_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+type Person {
+ friends: [Person]!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/PascalCaseObjectTypeDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/PascalCaseObjectTypeDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..c3c4e14
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/PascalCaseObjectTypeDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+type UserInformation {
+ fullName: String!
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..c330b9b
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___1___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+enum Status {
+ IN_PROGRESS
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..c330b9b
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___2___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+enum Status {
+ IN_PROGRESS
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..a72a646
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___3___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+enum Status {
+ ACTIVE
+}
diff --git a/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap b/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap
new file mode 100644
index 0000000..c330b9b
--- /dev/null
+++ b/tests/.pest/snapshots/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest/it_can_rename_type_with_data_set___Symfony_Component_Finder_SplFileInfo___4___Symfony_Component_Finder_SplFileInfo_Object_______.snap
@@ -0,0 +1,3 @@
+enum Status {
+ IN_PROGRESS
+}
diff --git a/tests/Feature/Inspections/CamelCaseFieldInspectionTest.php b/tests/Feature/Inspections/CamelCaseFieldInspectionTest.php
index a9c7906..70028eb 100644
--- a/tests/Feature/Inspections/CamelCaseFieldInspectionTest.php
+++ b/tests/Feature/Inspections/CamelCaseFieldInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\CamelCaseFieldDefinitionInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can rename field', function (SmartFileInfo $smartFileInfo) {
+it('can rename field', function (SplFileInfo $fileInfo) {
$inspection = $this->app->get(CamelCaseFieldDefinitionInspection::class);
- expect($smartFileInfo)
+ expect($fileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/CamelCaseFieldInspectionTest'
));
diff --git a/tests/Feature/Inspections/DescriptionRequiredInspectionTest.php b/tests/Feature/Inspections/DescriptionRequiredInspectionTest.php
index 2673643..11a3ec9 100644
--- a/tests/Feature/Inspections/DescriptionRequiredInspectionTest.php
+++ b/tests/Feature/Inspections/DescriptionRequiredInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\DescriptionRequiredInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can require description', function (SmartFileInfo $smartFileInfo) {
+it('can require description', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(DescriptionRequiredInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/DescriptionRequiredInspectionTest'
));
diff --git a/tests/Feature/Inspections/DisallowEnumInspectionTest.php b/tests/Feature/Inspections/DisallowEnumInspectionTest.php
index 1538d5e..884e32b 100644
--- a/tests/Feature/Inspections/DisallowEnumInspectionTest.php
+++ b/tests/Feature/Inspections/DisallowEnumInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\DisallowEnumInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can disallow enums', function (SmartFileInfo $smartFileInfo) {
+it('can disallow enums', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(DisallowEnumInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/DisallowEnumInspectionTest'
));
diff --git a/tests/Feature/Inspections/IgnoreByNameSuppressorInspectionTest.php b/tests/Feature/Inspections/IgnoreByNameSuppressorInspectionTest.php
index bd0d07a..d6fb7e3 100644
--- a/tests/Feature/Inspections/IgnoreByNameSuppressorInspectionTest.php
+++ b/tests/Feature/Inspections/IgnoreByNameSuppressorInspectionTest.php
@@ -4,19 +4,19 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\IgnoreByNameSuppressorInspection;
-
use Worksome\Graphlint\Inspections\NonNullableInsideListInspection;
+
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('ignores list inspection by name', function (SmartFileInfo $smartFileInfo) {
+it('ignores list inspection by name', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(NonNullableInsideListInspection::class);
$suppressor = $this->app->get(IgnoreByNameSuppressorInspection::class);
$suppressor->configure('User.alwaysTwoItems');
expect($smartFileInfo)
->toPassInspection($inspection, $suppressor);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/IgnoreByNameSuppressorInspectionTest'
));
diff --git a/tests/Feature/Inspections/IgnoreNextLineSuppressorInspectionTest.php b/tests/Feature/Inspections/IgnoreNextLineSuppressorInspectionTest.php
index 5b44448..50bbb2b 100644
--- a/tests/Feature/Inspections/IgnoreNextLineSuppressorInspectionTest.php
+++ b/tests/Feature/Inspections/IgnoreNextLineSuppressorInspectionTest.php
@@ -4,19 +4,18 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\CamelCaseFieldDefinitionInspection;
use Worksome\Graphlint\Inspections\IgnoreNextLineSuppressorInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can skip next line22', function (SmartFileInfo $smartFileInfo) {
+it('can skip next line22', function (SplFileInfo $smartFileInfo) {
// Load in an inspection which should error, but will be skipped instead.
$inspection = $this->app->get(CamelCaseFieldDefinitionInspection::class);
$suppressor = $this->app->get(IgnoreNextLineSuppressorInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection, $suppressor);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/IgnoreNextLineSuppressorInspectionTest'
));
diff --git a/tests/Feature/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest.php b/tests/Feature/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest.php
index ecdf479..dddf833 100644
--- a/tests/Feature/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest.php
+++ b/tests/Feature/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\InputSuffixInputObjectTypeDefinitionInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can rename input object type', function (SmartFileInfo $smartFileInfo) {
+it('can rename input object type', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(InputSuffixInputObjectTypeDefinitionInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/InputSuffixInputObjectTypeDefinitionInspectionTest'
));
diff --git a/tests/Feature/Inspections/ModelDirectiveRequiresIdFieldInspectionTest.php b/tests/Feature/Inspections/ModelDirectiveRequiresIdFieldInspectionTest.php
index d64ae55..54b91d1 100644
--- a/tests/Feature/Inspections/ModelDirectiveRequiresIdFieldInspectionTest.php
+++ b/tests/Feature/Inspections/ModelDirectiveRequiresIdFieldInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\ModelDirectiveRequiresIdFieldInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can disallow enums', function (SmartFileInfo $smartFileInfo) {
+it('can disallow enums', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(ModelDirectiveRequiresIdFieldInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/ModelDirectiveRequiresIdFieldInspectionTest'
));
diff --git a/tests/Feature/Inspections/MutationFieldArgumentNamedInputInspectionTest.php b/tests/Feature/Inspections/MutationFieldArgumentNamedInputInspectionTest.php
index 0d66748..63dc526 100644
--- a/tests/Feature/Inspections/MutationFieldArgumentNamedInputInspectionTest.php
+++ b/tests/Feature/Inspections/MutationFieldArgumentNamedInputInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\MutationFieldArgumentNamedInputInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can rename argument field', function (SmartFileInfo $smartFileInfo) {
+it('can rename argument field', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(MutationFieldArgumentNamedInputInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/MutationFieldArgumentNamedInputInspectionTest'
));
diff --git a/tests/Feature/Inspections/NonNullableIdInspectionTest.php b/tests/Feature/Inspections/NonNullableIdInspectionTest.php
index e20aa21..a7ddc4c 100644
--- a/tests/Feature/Inspections/NonNullableIdInspectionTest.php
+++ b/tests/Feature/Inspections/NonNullableIdInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\NonNullableIdInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can make id non null', function (SmartFileInfo $smartFileInfo) {
+it('can make id non null', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(NonNullableIdInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/NonNullableIdInspectionTest'
));
diff --git a/tests/Feature/Inspections/NonNullableInsideListInspectionTest.php b/tests/Feature/Inspections/NonNullableInsideListInspectionTest.php
index 78d31cf..788b8c1 100644
--- a/tests/Feature/Inspections/NonNullableInsideListInspectionTest.php
+++ b/tests/Feature/Inspections/NonNullableInsideListInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\NonNullableInsideListInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can make type inside list non null', function (SmartFileInfo $smartFileInfo) {
+it('can make type inside list non null', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(NonNullableInsideListInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/NonNullableInsideListInspectionTest'
));
diff --git a/tests/Feature/Inspections/NonNullableListInspectionTest.php b/tests/Feature/Inspections/NonNullableListInspectionTest.php
index b934c96..6e88bf1 100644
--- a/tests/Feature/Inspections/NonNullableListInspectionTest.php
+++ b/tests/Feature/Inspections/NonNullableListInspectionTest.php
@@ -4,15 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\NonNullableListInspection;
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can make list non null', function (SmartFileInfo $smartFileInfo) {
+it('can make list non null', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(NonNullableListInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/NonNullableListInspectionTest'
));
diff --git a/tests/Feature/Inspections/PascalCaseObjectTypeDefinitionInspectionTest.php b/tests/Feature/Inspections/PascalCaseObjectTypeDefinitionInspectionTest.php
index 36aa76d..d637c18 100644
--- a/tests/Feature/Inspections/PascalCaseObjectTypeDefinitionInspectionTest.php
+++ b/tests/Feature/Inspections/PascalCaseObjectTypeDefinitionInspectionTest.php
@@ -4,16 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\PascalCaseObjectTypeDefinitionInspection;
-
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can rename type', function (SmartFileInfo $smartFileInfo) {
+it('can rename type', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(PascalCaseObjectTypeDefinitionInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/PascalCaseObjectTypeDefinitionInspectionTest'
));
diff --git a/tests/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest.php b/tests/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest.php
index 0d7cc13..9c642c9 100644
--- a/tests/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest.php
+++ b/tests/Feature/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest.php
@@ -4,15 +4,15 @@
namespace Worksome\Graphlint\Tests\Feature\Inspections;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Inspections\UpperSnakeCaseEnumCaseDefinitionInspection;
use function Worksome\Graphlint\Tests\getFixturesForDirectory;
-it('can rename type', function (SmartFileInfo $smartFileInfo) {
+it('can rename type', function (SplFileInfo $smartFileInfo) {
$inspection = $this->app->get(UpperSnakeCaseEnumCaseDefinitionInspection::class);
expect($smartFileInfo)
->toPassInspection($inspection);
-})->with(getFixturesForDirectory(
+})->with(fn () => getFixturesForDirectory(
__DIR__ . '/../../../test-resources/Inspections/UpperSnakeCaseEnumCaseDefinitionInspectionTest'
));
diff --git a/tests/Pest.php b/tests/Pest.php
index 8daf640..f2c09dc 100644
--- a/tests/Pest.php
+++ b/tests/Pest.php
@@ -8,9 +8,8 @@
use GraphQL\Language\Printer;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
-use Symplify\EasyTesting\DataProvider\StaticFixtureFinder;
-use Symplify\EasyTesting\StaticFixtureSplitter;
-use Symplify\SmartFileSystem\SmartFileInfo;
+use Symfony\Component\Finder\Finder;
+use Symfony\Component\Finder\SplFileInfo;
use Worksome\Graphlint\Analyser\Analyser;
use Worksome\Graphlint\Contracts\SuppressorInspection;
use Worksome\Graphlint\Fixer\Fixer;
@@ -29,6 +28,7 @@
|
*/
uses(TestCase::class)->in('Feature');
+
/*
|--------------------------------------------------------------------------
| Expectations
@@ -43,20 +43,19 @@
Inspection $inspection,
SuppressorInspection|null $suppressorInspection = null,
) {
- $smartFileInfo = $this->value;
-
- $inputAndExpected = StaticFixtureSplitter::splitFileInfoToInputAndExpected($smartFileInfo);
+ /** @var SplFileInfo $file */
+ $file = $this->value;
$analyser = new Analyser();
$result = $analyser->analyse(
- Parser::parse($inputAndExpected->getInput()),
+ Parser::parse($file->getContents()),
new CompiledVisitorCollector(
[$inspection],
array_filter([$suppressorInspection]),
),
);
- if (Str::endsWith($smartFileInfo->getRealPath(), '.skip.graphql.inc')) {
+ if (Str::endsWith($file->getRealPath(), '.skip.graphql.inc')) {
$descriptions = Collection::make($result->getProblemsHolder()->getProblems())
->map(fn(ProblemDescriptor $descriptor) => $descriptor->getDescription())
->all();
@@ -72,9 +71,7 @@
$fixerResult = $fixer->fix($result);
$schemaPrint = Printer::doPrint($fixerResult->getDocumentNode());
- expect($schemaPrint)->toEqual(
- $inputAndExpected->getExpected()
- );
+ expect($schemaPrint)->toMatchSnapshot();
});
/*
@@ -88,24 +85,10 @@
|
*/
-/**
- * @return array>
- */
-function getFixturesForDirectory(string $directory): array
+function getFixturesForDirectory(string $directory): Finder
{
- /** @var iterable> $args */
- $args = StaticFixtureFinder::yieldDirectory(
- $directory,
- '*.graphql.inc',
- );
-
- $values = [];
-
- foreach ($args as $files) {
- $file = $files[0];
-
- $values[$file->getFilename()] = $files;
- }
-
- return $values;
+ return Finder::create()
+ ->files()
+ ->name('*.graphql.inc')
+ ->in($directory);
}