@@ -17,14 +17,14 @@ final class ConfigTest extends TestCase
17
17
{
18
18
public function testImplementsInterface (): void
19
19
{
20
- static :: assertInstanceOf (ConfigInterface::class, new Config ());
20
+ $ this -> assertInstanceOf (ConfigInterface::class, new Config ());
21
21
}
22
22
23
23
public function testValues (): void
24
24
{
25
25
$ config = new Config ();
26
26
27
- static :: assertSame ('narrowspark ' , $ config ->getName ());
27
+ $ this -> assertSame ('narrowspark ' , $ config ->getName ());
28
28
}
29
29
30
30
public function testHasPsr2Rules (): void
@@ -67,20 +67,20 @@ public function testIfAllRulesAreTested(): void
67
67
$ rules = (new Config ())->getRules ();
68
68
69
69
foreach ($ rules as $ key => $ value ) {
70
- static :: assertTrue (isset ($ testRules [$ key ]), '[ ' . $ key . '] Rule is missing. ' );
70
+ $ this -> assertTrue (isset ($ testRules [$ key ]), '[ ' . $ key . '] Rule is missing. ' );
71
71
}
72
72
73
- static :: assertCount (\count ($ testRules ), $ rules );
73
+ $ this -> assertCount (\count ($ testRules ), $ rules );
74
74
}
75
75
76
76
public function testDoesNotHaveHeaderCommentFixerByDefault (): void
77
77
{
78
78
$ rules = (new Config ())->getRules ();
79
79
80
- static :: assertArrayHasKey ('header_comment ' , $ rules );
81
- static :: assertFalse ($ rules ['header_comment ' ]);
82
- static :: assertTrue ($ rules ['no_blank_lines_before_namespace ' ]);
83
- static :: assertFalse ($ rules ['single_blank_line_before_namespace ' ]);
80
+ $ this -> assertArrayHasKey ('header_comment ' , $ rules );
81
+ $ this -> assertFalse ($ rules ['header_comment ' ]);
82
+ $ this -> assertTrue ($ rules ['no_blank_lines_before_namespace ' ]);
83
+ $ this -> assertFalse ($ rules ['single_blank_line_before_namespace ' ]);
84
84
}
85
85
86
86
public function testHasHeaderCommentFixerIfProvided (): void
@@ -89,17 +89,17 @@ public function testHasHeaderCommentFixerIfProvided(): void
89
89
$ config = new Config ($ header );
90
90
$ rules = $ config ->getRules ();
91
91
92
- static :: assertArrayHasKey ('header_comment ' , $ rules );
92
+ $ this -> assertArrayHasKey ('header_comment ' , $ rules );
93
93
94
94
$ expected = [
95
95
'comment_type ' => 'PHPDoc ' ,
96
96
'header ' => $ header ,
97
97
'location ' => 'after_declare_strict ' ,
98
98
'separate ' => 'both ' ,
99
99
];
100
- static :: assertSame ($ expected , $ rules ['header_comment ' ]);
101
- static :: assertTrue ($ rules ['no_blank_lines_before_namespace ' ]);
102
- static :: assertFalse ($ rules ['single_blank_line_before_namespace ' ]);
100
+ $ this -> assertSame ($ expected , $ rules ['header_comment ' ]);
101
+ $ this -> assertTrue ($ rules ['no_blank_lines_before_namespace ' ]);
102
+ $ this -> assertFalse ($ rules ['single_blank_line_before_namespace ' ]);
103
103
}
104
104
105
105
public function testAllConfiguredRulesAreBuiltIn (): void
@@ -119,7 +119,7 @@ public function testAllConfiguredRulesAreBuiltIn(): void
119
119
\array_merge ($ this ->builtInFixers (), $ pedroTrollerRules )
120
120
);
121
121
122
- static :: assertEmpty ($ fixersNotBuiltIn , \sprintf (
122
+ $ this -> assertEmpty ($ fixersNotBuiltIn , \sprintf (
123
123
'Failed to assert that fixers for the rules "%s" are built in ' ,
124
124
\implode ('", " ' , $ fixersNotBuiltIn )
125
125
));
@@ -139,13 +139,13 @@ public function testDoesNotHaveRulesEnabled(string $fixer, $reason): void
139
139
];
140
140
141
141
if ($ fixer === 'array_syntax ' ) {
142
- static :: assertNotSame (['syntax ' => 'long ' ], $ config ->getRules ()['array_syntax ' ], \sprintf (
142
+ $ this -> assertNotSame (['syntax ' => 'long ' ], $ config ->getRules ()['array_syntax ' ], \sprintf (
143
143
'Fixer "%s" should not be enabled, because "%s" ' ,
144
144
$ fixer ,
145
145
$ reason ['long ' ]
146
146
));
147
147
} else {
148
- static :: assertArraySubset ($ rule , $ config ->getRules (), true , \sprintf (
148
+ $ this -> assertArraySubset ($ rule , $ config ->getRules (), true , \sprintf (
149
149
'Fixer "%s" should not be enabled, because "%s" ' ,
150
150
$ fixer ,
151
151
$ reason
@@ -353,7 +353,7 @@ private function getPHPUnitRules(): array
353
353
'use_class_const ' => true ,
354
354
],
355
355
'php_unit_test_case_static_method_calls ' => [
356
- 'call_type ' => 'static ' ,
356
+ 'call_type ' => 'this ' ,
357
357
],
358
358
'php_unit_internal_class ' => [
359
359
'types ' => [
@@ -548,12 +548,12 @@ private function getSymfonyRules(): array
548
548
private function assertHasRules (array $ expected , array $ actual , string $ set ): void
549
549
{
550
550
foreach ($ expected as $ fixer => $ isEnabled ) {
551
- static :: assertArrayHasKey ($ fixer , $ actual , \sprintf (
551
+ $ this -> assertArrayHasKey ($ fixer , $ actual , \sprintf (
552
552
'Failed to assert that a rule for fixer "%s" (in set "%s") exists., ' ,
553
553
$ fixer ,
554
554
$ set
555
555
));
556
- static :: assertSame ($ isEnabled , $ actual [$ fixer ], \sprintf (
556
+ $ this -> assertSame ($ isEnabled , $ actual [$ fixer ], \sprintf (
557
557
'Failed to assert that fixer "%s" (in set "%s") is %s. ' ,
558
558
$ fixer ,
559
559
$ set ,
0 commit comments