File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 7
7
<file >./Inpsyde/Sniffs</file >
8
8
<file >./tests/src</file >
9
9
<file >./tests/cases</file >
10
+ <file >./tests/e2e/E2eTest.php</file >
10
11
11
12
<!--
12
13
PHP 7.4 and higher.
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ protected function setUp(): void
21
21
public function testInpsydeAndTemplatesRulesets (): void
22
22
{
23
23
$ output = [];
24
+ // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.system_calls_exec
24
25
exec (
25
26
sprintf (
26
27
'cd %s && %s ' ,
@@ -37,7 +38,8 @@ public function testInpsydeAndTemplatesRulesets(): void
37
38
38
39
$ json = end ($ output );
39
40
40
- self ::assertSame ([
41
+ // phpcs:disable Inpsyde.CodeQuality.LineLength.TooLong
42
+ $ expectedMessages = [
41
43
'index.php ' => [
42
44
[
43
45
'source ' => 'Inpsyde.CodeQuality.NoElse.ElseFound ' ,
@@ -64,13 +66,16 @@ public function testInpsydeAndTemplatesRulesets(): void
64
66
],
65
67
66
68
],
67
- ], $ this ->phpCsNormalizedOutput ($ json ));
69
+ ];
70
+ // phpcs:enable Inpsyde.CodeQuality.LineLength.TooLong
71
+
72
+ self ::assertSame ($ expectedMessages , $ this ->phpCsMessages ($ json ));
68
73
}
69
74
70
75
/**
71
76
* @psalm-return array<string, list<array{source: string, line: positive-int}>>
72
77
*/
73
- private function phpCsNormalizedOutput (string $ json ): array
78
+ private function phpCsMessages (string $ json ): array
74
79
{
75
80
/** @var array{
76
81
* files: array<string, array{
You can’t perform that action at this time.
0 commit comments