File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ protected function executeMakerCommand(MakerTestDetails $testDetails)
54
54
$ this ->markTestSkipped ();
55
55
}
56
56
57
+ if ($ testDetails ->skipOnWindows () && '\\' === \DIRECTORY_SEPARATOR ) {
58
+ $ this ->markTestSkipped ('This test is not supported on Windows ' );
59
+ }
60
+
57
61
$ testEnv = MakerTestEnvironment::create ($ testDetails );
58
62
59
63
// prepare environment to test
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ final class MakerTestDetails
24
24
private array $ requiredPackageVersions = [];
25
25
private int $ blockedPhpVersionUpper = 0 ;
26
26
private int $ blockedPhpVersionLower = 0 ;
27
+ private bool $ skipOnWindows = false ;
27
28
28
29
public function __construct (
29
30
private MakerInterface $ maker ,
@@ -175,4 +176,11 @@ public function getPreRunCallbacks(): array
175
176
{
176
177
return $ this ->preRunCallbacks ;
177
178
}
179
+
180
+ public function skipOnWindows (): self
181
+ {
182
+ $ this ->skipOnWindows = true ;
183
+
184
+ return $ this ;
185
+ }
178
186
}
Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ public function getTestDetails(): \Generator
34
34
{
35
35
yield 'lints_templates_with_custom_php_cs_fixer_and_config ' => [$ this ->createMakerTest ()
36
36
->addExtraDependencies ('friendsofphp/php-cs-fixer ' )
37
+ // these tests are troublesome on Windows
38
+ ->skipOnWindows ()
37
39
->run (function (MakerTestRunner $ runner ) {
38
40
$ runner ->copy ('template-linter/php-cs-fixer.test.php ' , 'php-cs-fixer.test.php ' );
39
41
@@ -60,6 +62,8 @@ public function getTestDetails(): \Generator
60
62
61
63
yield 'lints_templates_with_flex_generated_config_file ' => [$ this ->createMakerTest ()
62
64
->addExtraDependencies ('friendsofphp/php-cs-fixer ' )
65
+ // these tests are troublesome on Windows
66
+ ->skipOnWindows ()
63
67
->run (function (MakerTestRunner $ runner ) {
64
68
$ runner ->replaceInFile (
65
69
'.php-cs-fixer.dist.php ' ,
You can’t perform that action at this time.
0 commit comments