File tree Expand file tree Collapse file tree 4 files changed +38
-7
lines changed
app/code/Magento/BundleGraphQl/etc
framework/Magento/TestFramework/CodingStandard/Tool/CodeSniffer
testsuite/Magento/Test/GraphQl Expand file tree Collapse file tree 4 files changed +38
-7
lines changed Original file line number Diff line number Diff line change 3
3
4
4
type Mutation {
5
5
addBundleProductsToCart (input : AddBundleProductsToCartInput ): AddBundleProductsToCartOutput @resolver (class : " Magento\\ QuoteGraphQl\\ Model\\ Resolver\\ AddSimpleProductsToCart" )
6
- testStatic (invalid_argument): invalid_output
7
6
}
8
7
9
8
input AddBundleProductsToCartInput {
@@ -87,3 +86,5 @@ enum ShipBundleItemsEnum @doc(description: "This enumeration defines whether bun
87
86
TOGETHER
88
87
SEPARATELY
89
88
}
89
+
90
+ type invalidCamelCaseType {}
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \TestFramework \CodingStandard \Tool \CodeSniffer ;
9
+
10
+ /**
11
+ * Add GraphQl files extension to config.
12
+ */
13
+ class GraphQlWrapper extends Wrapper
14
+ {
15
+ const FILE_EXTENSION = 'graphqls ' ;
16
+
17
+ private const TOKENIZER = 'GraphQL ' ;
18
+
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ public function init ()
23
+ {
24
+ parent ::init ();
25
+
26
+ $ this ->config ->extensions += [self ::FILE_EXTENSION => self ::TOKENIZER ];
27
+ }
28
+ }
Original file line number Diff line number Diff line change 21
21
<testsuite name =" HTML Static Code Analysis" >
22
22
<file >testsuite/Magento/Test/Html/LiveCodeTest.php</file >
23
23
</testsuite >
24
- <testsuite name =" PHP Coding Standard Verification" >
25
- <file >testsuite/Magento/Test/Php/LiveCodeTest.php</file >
26
- </testsuite >
27
24
<testsuite name =" GraphQL Static Code Analysis" >
28
25
<file >testsuite/Magento/Test/GraphQl/LiveCodeTest.php</file >
29
26
</testsuite >
27
+ <testsuite name =" PHP Coding Standard Verification" >
28
+ <file >testsuite/Magento/Test/Php/LiveCodeTest.php</file >
29
+ </testsuite >
30
30
<testsuite name =" Code Integrity Tests" >
31
31
<directory >testsuite/Magento/Test/Integrity</directory >
32
32
</testsuite >
Original file line number Diff line number Diff line change @@ -38,9 +38,11 @@ public static function setUpBeforeClass(): void
38
38
*/
39
39
public function testCodeStyle (): void
40
40
{
41
- $ reportFile = self ::$ reportDir . '/graphql_phpcs_report.txt ' ;
42
- $ codeSniffer = new CodeSniffer ('Magento ' , $ reportFile , new Wrapper ());
43
- $ result = $ codeSniffer ->run (PHPCodeTest::getWhitelist (['graphqls ' ]));
41
+ $ reportFile = self ::$ reportDir . '/graphql_phpcs_report.txt ' ;
42
+ $ codeSniffer = new CodeSniffer ('Magento ' ,
43
+ $ reportFile , new Wrapper ());
44
+ $ codeSniffer ->setExtensions ([CodeSniffer \GraphQlWrapper::FILE_EXTENSION ]);
45
+ $ result = $ codeSniffer ->run (PHPCodeTest::getWhitelist ([CodeSniffer \GraphQlWrapper::FILE_EXTENSION ]));
44
46
$ report = file_exists ($ reportFile ) ? file_get_contents ($ reportFile ) : '' ;
45
47
$ this ->assertEquals (
46
48
0 ,
You can’t perform that action at this time.
0 commit comments