@@ -28,7 +28,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
28
28
public static function setUpBeforeClass ()
29
29
{
30
30
$ phpBin = new PhpExecutableFinder ();
31
- self ::$ phpBin = $ phpBin ->find ();
31
+ self ::$ phpBin = ' phpdbg ' === PHP_SAPI ? ' php ' : $ phpBin ->find ();
32
32
}
33
33
34
34
public function testThatProcessDoesNotThrowWarningDuringRun ()
@@ -81,7 +81,7 @@ public function testStopWithTimeoutIsActuallyWorking()
81
81
// exec is mandatory here since we send a signal to the process
82
82
// see https://github.com/symfony/symfony/issues/5030 about prepending
83
83
// command with exec
84
- $ p = $ this ->getProcess ('exec php ' .__DIR__ .'/NonStopableProcess.php 3 ' );
84
+ $ p = $ this ->getProcess ('exec ' . self :: $ phpBin . ' ' .__DIR__ .'/NonStopableProcess.php 3 ' );
85
85
$ p ->start ();
86
86
usleep (100000 );
87
87
$ start = microtime (true );
@@ -452,7 +452,7 @@ public function testTTYCommand()
452
452
$ this ->markTestSkipped ('Windows does have /dev/tty support ' );
453
453
}
454
454
455
- $ process = $ this ->getProcess ('echo "foo" >> /dev/null && php -r "usleep(100000);" ' );
455
+ $ process = $ this ->getProcess ('echo "foo" >> /dev/null && ' . self :: $ phpBin . ' -r "usleep(100000);" ' );
456
456
$ process ->setTty (true );
457
457
$ process ->start ();
458
458
$ this ->assertTrue ($ process ->isRunning ());
@@ -712,7 +712,7 @@ public function testProcessThrowsExceptionWhenExternallySignaled()
712
712
713
713
$ termSignal = defined ('SIGKILL ' ) ? SIGKILL : 9 ;
714
714
715
- $ process = $ this ->getProcess ('exec php -r "while (true) {}" ' );
715
+ $ process = $ this ->getProcess ('exec ' . self :: $ phpBin . ' -r "while (true) {}" ' );
716
716
$ process ->start ();
717
717
posix_kill ($ process ->getPid (), $ termSignal );
718
718
@@ -738,18 +738,6 @@ public function testRestart()
738
738
$ this ->assertNotEquals ($ process1 ->getOutput (), $ process2 ->getOutput ());
739
739
}
740
740
741
- public function testPhpDeadlock ()
742
- {
743
- $ this ->markTestSkipped ('Can cause PHP to hang ' );
744
-
745
- // Sleep doesn't work as it will allow the process to handle signals and close
746
- // file handles from the other end.
747
- $ process = $ this ->getProcess (self ::$ phpBin .' -r "while (true) {}" ' );
748
- $ process ->start ();
749
-
750
- // PHP will deadlock when it tries to cleanup $process
751
- }
752
-
753
741
public function testRunProcessWithTimeout ()
754
742
{
755
743
$ timeout = 0.5 ;
0 commit comments