From f95a70e1172659ae80aff3a64b470bd8c13968c8 Mon Sep 17 00:00:00 2001 From: p-makowski Date: Wed, 13 Sep 2023 22:27:12 +0200 Subject: [PATCH] [BUGFIX] #465 Trim tokens from graphql files to allow multiline type definitions - unit tests adjusted --- .../Tests/GraphQL/ValidTypeNameUnitTest.graphqls | 2 ++ Magento2/Tests/GraphQL/ValidTypeNameUnitTest.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Magento2/Tests/GraphQL/ValidTypeNameUnitTest.graphqls b/Magento2/Tests/GraphQL/ValidTypeNameUnitTest.graphqls index 1fba0386..848b77d1 100644 --- a/Magento2/Tests/GraphQL/ValidTypeNameUnitTest.graphqls +++ b/Magento2/Tests/GraphQL/ValidTypeNameUnitTest.graphqls @@ -1,5 +1,7 @@ # Valid type names. type ValidCamelCaseType {} +type ValidCamelCaseTypeNewLineBrace +{} interface ValidCamelCaseInterface {} enum ValidCamelCaseEnum {} diff --git a/Magento2/Tests/GraphQL/ValidTypeNameUnitTest.php b/Magento2/Tests/GraphQL/ValidTypeNameUnitTest.php index b1fd29b9..3948537a 100644 --- a/Magento2/Tests/GraphQL/ValidTypeNameUnitTest.php +++ b/Magento2/Tests/GraphQL/ValidTypeNameUnitTest.php @@ -23,21 +23,21 @@ class ValidTypeNameUnitTest extends AbstractGraphQLSniffUnitTestCase protected function getErrorList() { return [ - 7 => 1, - 8 => 1, 9 => 1, 10 => 1, 11 => 1, 12 => 1, - 15 => 1, - 16 => 1, + 13 => 1, + 14 => 1, 17 => 1, - 21 => 1, + 18 => 1, + 19 => 1, 23 => 1, 25 => 1, - 35 => 1, - 39 => 1, - 43 => 1, + 27 => 1, + 37 => 1, + 41 => 1, + 45 => 1, ]; }