File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ class BackgroundJobTest extends \PHPUnit_Framework_TestCase
21
21
*/
22
22
private $ logFile ;
23
23
24
+ /**
25
+ * @var Helper
26
+ */
27
+ private $ helper ;
28
+
24
29
/**
25
30
* {@inheritdoc}
26
31
*/
@@ -30,6 +35,8 @@ protected function setUp()
30
35
if (file_exists ($ this ->logFile )) {
31
36
unlink ($ this ->logFile );
32
37
}
38
+
39
+ $ this ->helper = new Helper ();
33
40
}
34
41
35
42
/**
@@ -89,11 +96,19 @@ public function testInvalidCommand()
89
96
$ this ->runJob (['command ' => 'invalid-command ' ]);
90
97
91
98
$ this ->assertContains ('invalid-command ' , $ this ->getLogContent ());
92
- $ this ->assertContains ('not found ' , $ this ->getLogContent ());
93
- $ this ->assertContains (
94
- "ERROR: Job exited with status '127' " ,
95
- $ this ->getLogContent ()
96
- );
99
+
100
+ if ($ this ->helper ->getPlatform () === Helper::UNIX ) {
101
+ $ this ->assertContains ('not found ' , $ this ->getLogContent ());
102
+ $ this ->assertContains (
103
+ "ERROR: Job exited with status '127' " ,
104
+ $ this ->getLogContent ()
105
+ );
106
+ } else {
107
+ $ this ->assertContains (
108
+ 'not recognized as an internal or external command ' ,
109
+ $ this ->getLogContent ()
110
+ );
111
+ }
97
112
}
98
113
99
114
/**
You can’t perform that action at this time.
0 commit comments