File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
src/Symfony/Component/Process/Tests Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -16,15 +16,16 @@ addons:
16
16
env :
17
17
global :
18
18
- MIN_PHP=7.1.3
19
- - SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/versions/7.1/bin /php
19
+ - SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/shims /php
20
20
21
21
matrix :
22
22
include :
23
23
- php : 7.1.3
24
24
- php : 7.1
25
25
env : deps=high
26
- - php : 7.1
26
+ - php : 7.2
27
27
env : deps=low
28
+
28
29
fast_finish : true
29
30
30
31
cache :
Original file line number Diff line number Diff line change @@ -117,9 +117,14 @@ public function testStopWithTimeoutIsActuallyWorking()
117
117
$ p = $ this ->getProcess (array (self ::$ phpBin , __DIR__ .'/NonStopableProcess.php ' , 30 ));
118
118
$ p ->start ();
119
119
120
- while (false === strpos ($ p ->getOutput (), 'received ' )) {
120
+ while ($ p -> isRunning () && false === strpos ($ p ->getOutput (), 'received ' )) {
121
121
usleep (1000 );
122
122
}
123
+
124
+ if (!$ p ->isRunning ()) {
125
+ throw new \LogicException ('Process is not running: ' .$ p ->getErrorOutput ());
126
+ }
127
+
123
128
$ start = microtime (true );
124
129
$ p ->stop (0.1 );
125
130
@@ -1456,6 +1461,19 @@ public function testRawCommandLine()
1456
1461
)
1457
1462
1458
1463
EOTXT ;
1464
+
1465
+ if (\PHP_VERSION_ID >= 70200 ) {
1466
+ $ expected = <<<EOTXT
1467
+ Array
1468
+ (
1469
+ [0] => Standard input code
1470
+ [1] => a
1471
+ [2] =>
1472
+ [3] => b
1473
+ )
1474
+
1475
+ EOTXT ;
1476
+ }
1459
1477
$ this ->assertSame ($ expected , $ p ->getOutput ());
1460
1478
}
1461
1479
You can’t perform that action at this time.
0 commit comments