99
1010namespace PHP_CodeSniffer \Tests \Core ;
1111
12- use PHP_CodeSniffer \Config ;
1312use PHP_CodeSniffer \Ruleset ;
1413use PHP_CodeSniffer \Files \DummyFile ;
14+ use PHP_CodeSniffer \Tests \ConfigDouble ;
1515use PHPUnit \Framework \TestCase ;
1616
1717/**
@@ -41,7 +41,7 @@ public function testSuppressError($before, $after, $expectedErrors=0)
4141 static $ config , $ ruleset ;
4242
4343 if (isset ($ config , $ ruleset ) === false ) {
44- $ config = new Config ();
44+ $ config = new ConfigDouble ();
4545 $ config ->standards = ['Generic ' ];
4646 $ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
4747
@@ -173,7 +173,7 @@ public function testSuppressSomeErrors($before, $between, $expectedErrors=1)
173173 static $ config , $ ruleset ;
174174
175175 if (isset ($ config , $ ruleset ) === false ) {
176- $ config = new Config ();
176+ $ config = new ConfigDouble ();
177177 $ config ->standards = ['Generic ' ];
178178 $ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
179179
@@ -265,7 +265,7 @@ public function testSuppressWarning($before, $after, $expectedWarnings=0)
265265 static $ config , $ ruleset ;
266266
267267 if (isset ($ config , $ ruleset ) === false ) {
268- $ config = new Config ();
268+ $ config = new ConfigDouble ();
269269 $ config ->standards = ['Generic ' ];
270270 $ config ->sniffs = ['Generic.Commenting.Todo ' ];
271271
@@ -349,7 +349,7 @@ public function testSuppressLine($before, $after='', $expectedErrors=1)
349349 static $ config , $ ruleset ;
350350
351351 if (isset ($ config , $ ruleset ) === false ) {
352- $ config = new Config ();
352+ $ config = new ConfigDouble ();
353353 $ config ->standards = ['Generic ' ];
354354 $ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
355355
@@ -445,7 +445,7 @@ public static function dataSuppressLine()
445445 */
446446 public function testSuppressLineMidLine ()
447447 {
448- $ config = new Config ();
448+ $ config = new ConfigDouble ();
449449 $ config ->standards = ['Generic ' ];
450450 $ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
451451
@@ -468,7 +468,7 @@ public function testSuppressLineMidLine()
468468 */
469469 public function testSuppressLineWithinDocblock ()
470470 {
471- $ config = new Config ();
471+ $ config = new ConfigDouble ();
472472 $ config ->standards = ['Generic ' ];
473473 $ config ->sniffs = ['Generic.Files.LineLength ' ];
474474
@@ -508,7 +508,7 @@ public function testNestedSuppressLine($before, $after)
508508 static $ config , $ ruleset ;
509509
510510 if (isset ($ config , $ ruleset ) === false ) {
511- $ config = new Config ();
511+ $ config = new ConfigDouble ();
512512 $ config ->standards = ['Generic ' ];
513513 $ config ->sniffs = ['Generic.PHP.LowerCaseConstant ' ];
514514
@@ -598,7 +598,7 @@ public function testSuppressScope($before, $after, $expectedErrors=0)
598598 static $ config , $ ruleset ;
599599
600600 if (isset ($ config , $ ruleset ) === false ) {
601- $ config = new Config ();
601+ $ config = new ConfigDouble ();
602602 $ config ->standards = ['PEAR ' ];
603603 $ config ->sniffs = ['PEAR.Functions.FunctionDeclaration ' ];
604604
@@ -695,7 +695,7 @@ public function testSuppressFile($before, $after='', $expectedWarnings=0)
695695 static $ config , $ ruleset ;
696696
697697 if (isset ($ config , $ ruleset ) === false ) {
698- $ config = new Config ();
698+ $ config = new ConfigDouble ();
699699 $ config ->standards = ['Generic ' ];
700700 $ config ->sniffs = ['Generic.Commenting.Todo ' ];
701701
@@ -809,7 +809,7 @@ public function testDisableSelected($before, $expectedErrors=0, $expectedWarning
809809 static $ config , $ ruleset ;
810810
811811 if (isset ($ config , $ ruleset ) === false ) {
812- $ config = new Config ();
812+ $ config = new ConfigDouble ();
813813 $ config ->standards = ['Generic ' ];
814814 $ config ->sniffs = [
815815 'Generic.PHP.LowerCaseConstant ' ,
@@ -926,7 +926,7 @@ public function testEnableSelected($code, $expectedErrors, $expectedWarnings)
926926 static $ config , $ ruleset ;
927927
928928 if (isset ($ config , $ ruleset ) === false ) {
929- $ config = new Config ();
929+ $ config = new ConfigDouble ();
930930 $ config ->standards = ['Generic ' ];
931931 $ config ->sniffs = [
932932 'Generic.PHP.LowerCaseConstant ' ,
@@ -1100,7 +1100,7 @@ public function testIgnoreSelected($before, $expectedErrors, $expectedWarnings)
11001100 static $ config , $ ruleset ;
11011101
11021102 if (isset ($ config , $ ruleset ) === false ) {
1103- $ config = new Config ();
1103+ $ config = new ConfigDouble ();
11041104 $ config ->standards = ['Generic ' ];
11051105 $ config ->sniffs = [
11061106 'Generic.PHP.LowerCaseConstant ' ,
@@ -1191,7 +1191,7 @@ public function testCommenting($code, $expectedErrors, $expectedWarnings)
11911191 static $ config , $ ruleset ;
11921192
11931193 if (isset ($ config , $ ruleset ) === false ) {
1194- $ config = new Config ();
1194+ $ config = new ConfigDouble ();
11951195 $ config ->standards = ['Generic ' ];
11961196 $ config ->sniffs = [
11971197 'Generic.PHP.LowerCaseConstant ' ,
0 commit comments