File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ abstract class AbstractMethodUnitTest extends TestCase
2828 */
2929 protected static $ fileExtension = 'inc ' ;
3030
31+ /**
32+ * The tab width setting to use when tokenizing the file.
33+ *
34+ * This allows for test case files to use a different tab width than the default.
35+ *
36+ * @var integer
37+ */
38+ protected static $ tabWidth = 4 ;
39+
3140 /**
3241 * The \PHP_CodeSniffer\Files\File object containing the parsed contents of the test case file.
3342 *
@@ -63,7 +72,10 @@ public static function initializeFile()
6372 self ::setStaticConfigProperty ('configData ' , ['report_width ' => 80 ]);
6473 self ::setStaticConfigProperty ('configDataFile ' , '' );
6574
66- $ config = new Config ();
75+ $ config = new Config ();
76+ // Also set a tab-width to enable testing tab-replaced vs `orig_content`.
77+ $ config ->tabWidth = static ::$ tabWidth ;
78+
6779 $ ruleset = new Ruleset ($ config );
6880
6981 // Default to a file with the same name as the test class. Extension is property based.
You can’t perform that action at this time.
0 commit comments