9
9
10
10
namespace PHP_CodeSniffer \Tests \Core ;
11
11
12
- use PHP_CodeSniffer \Config ;
13
12
use PHP_CodeSniffer \Ruleset ;
14
13
use PHP_CodeSniffer \Files \DummyFile ;
14
+ use PHP_CodeSniffer \Tests \ConfigDouble ;
15
15
use PHPUnit \Framework \TestCase ;
16
16
17
17
/**
@@ -41,7 +41,7 @@ public function testSuppressError($before, $after, $expectedErrors=0)
41
41
static $ config , $ ruleset ;
42
42
43
43
if (isset ($ config , $ ruleset ) === false ) {
44
- $ config = new Config ();
44
+ $ config = new ConfigDouble ();
45
45
$ config ->standards = ['Generic ' ];
46
46
$ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
47
47
@@ -173,7 +173,7 @@ public function testSuppressSomeErrors($before, $between, $expectedErrors=1)
173
173
static $ config , $ ruleset ;
174
174
175
175
if (isset ($ config , $ ruleset ) === false ) {
176
- $ config = new Config ();
176
+ $ config = new ConfigDouble ();
177
177
$ config ->standards = ['Generic ' ];
178
178
$ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
179
179
@@ -265,7 +265,7 @@ public function testSuppressWarning($before, $after, $expectedWarnings=0)
265
265
static $ config , $ ruleset ;
266
266
267
267
if (isset ($ config , $ ruleset ) === false ) {
268
- $ config = new Config ();
268
+ $ config = new ConfigDouble ();
269
269
$ config ->standards = ['Generic ' ];
270
270
$ config ->sniffs = ['Generic.Commenting.Todo ' ];
271
271
@@ -349,7 +349,7 @@ public function testSuppressLine($before, $after='', $expectedErrors=1)
349
349
static $ config , $ ruleset ;
350
350
351
351
if (isset ($ config , $ ruleset ) === false ) {
352
- $ config = new Config ();
352
+ $ config = new ConfigDouble ();
353
353
$ config ->standards = ['Generic ' ];
354
354
$ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
355
355
@@ -445,7 +445,7 @@ public static function dataSuppressLine()
445
445
*/
446
446
public function testSuppressLineMidLine ()
447
447
{
448
- $ config = new Config ();
448
+ $ config = new ConfigDouble ();
449
449
$ config ->standards = ['Generic ' ];
450
450
$ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
451
451
@@ -468,7 +468,7 @@ public function testSuppressLineMidLine()
468
468
*/
469
469
public function testSuppressLineWithinDocblock ()
470
470
{
471
- $ config = new Config ();
471
+ $ config = new ConfigDouble ();
472
472
$ config ->standards = ['Generic ' ];
473
473
$ config ->sniffs = ['Generic.Files.LineLength ' ];
474
474
@@ -508,7 +508,7 @@ public function testNestedSuppressLine($before, $after)
508
508
static $ config , $ ruleset ;
509
509
510
510
if (isset ($ config , $ ruleset ) === false ) {
511
- $ config = new Config ();
511
+ $ config = new ConfigDouble ();
512
512
$ config ->standards = ['Generic ' ];
513
513
$ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
514
514
@@ -598,7 +598,7 @@ public function testSuppressScope($before, $after, $expectedErrors=0)
598
598
static $ config , $ ruleset ;
599
599
600
600
if (isset ($ config , $ ruleset ) === false ) {
601
- $ config = new Config ();
601
+ $ config = new ConfigDouble ();
602
602
$ config ->standards = ['PEAR ' ];
603
603
$ config ->sniffs = ['PEAR.Functions.FunctionDeclaration ' ];
604
604
@@ -695,7 +695,7 @@ public function testSuppressFile($before, $after='', $expectedWarnings=0)
695
695
static $ config , $ ruleset ;
696
696
697
697
if (isset ($ config , $ ruleset ) === false ) {
698
- $ config = new Config ();
698
+ $ config = new ConfigDouble ();
699
699
$ config ->standards = ['Generic ' ];
700
700
$ config ->sniffs = ['Generic.Commenting.Todo ' ];
701
701
@@ -809,7 +809,7 @@ public function testDisableSelected($before, $expectedErrors=0, $expectedWarning
809
809
static $ config , $ ruleset ;
810
810
811
811
if (isset ($ config , $ ruleset ) === false ) {
812
- $ config = new Config ();
812
+ $ config = new ConfigDouble ();
813
813
$ config ->standards = ['Generic ' ];
814
814
$ config ->sniffs = [
815
815
'Generic.PHP.LowerCaseConstant ' ,
@@ -926,7 +926,7 @@ public function testEnableSelected($code, $expectedErrors, $expectedWarnings)
926
926
static $ config , $ ruleset ;
927
927
928
928
if (isset ($ config , $ ruleset ) === false ) {
929
- $ config = new Config ();
929
+ $ config = new ConfigDouble ();
930
930
$ config ->standards = ['Generic ' ];
931
931
$ config ->sniffs = [
932
932
'Generic.PHP.LowerCaseConstant ' ,
@@ -1100,7 +1100,7 @@ public function testIgnoreSelected($before, $expectedErrors, $expectedWarnings)
1100
1100
static $ config , $ ruleset ;
1101
1101
1102
1102
if (isset ($ config , $ ruleset ) === false ) {
1103
- $ config = new Config ();
1103
+ $ config = new ConfigDouble ();
1104
1104
$ config ->standards = ['Generic ' ];
1105
1105
$ config ->sniffs = [
1106
1106
'Generic.PHP.LowerCaseConstant ' ,
@@ -1191,7 +1191,7 @@ public function testCommenting($code, $expectedErrors, $expectedWarnings)
1191
1191
static $ config , $ ruleset ;
1192
1192
1193
1193
if (isset ($ config , $ ruleset ) === false ) {
1194
- $ config = new Config ();
1194
+ $ config = new ConfigDouble ();
1195
1195
$ config ->standards = ['Generic ' ];
1196
1196
$ config ->sniffs = [
1197
1197
'Generic.PHP.LowerCaseConstant ' ,
0 commit comments