File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed
Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -476,6 +476,10 @@ public function testTTYCommand()
476476 $ this ->markTestSkipped ('Windows does not have /dev/tty support ' );
477477 }
478478
479+ if (!Process::isTtySupported ()) {
480+ $ this ->markTestSkipped ('There is no TTY support ' );
481+ }
482+
479483 $ process = $ this ->getProcess ('echo "foo" >> /dev/null && ' .$ this ->getProcessForCode ('usleep(100000); ' )->getCommandLine ());
480484 $ process ->setTty (true );
481485 $ process ->start ();
@@ -491,6 +495,10 @@ public function testTTYCommandExitCode()
491495 $ this ->markTestSkipped ('Windows does have /dev/tty support ' );
492496 }
493497
498+ if (!Process::isTtySupported ()) {
499+ $ this ->markTestSkipped ('There is no TTY support ' );
500+ }
501+
494502 $ process = $ this ->getProcess ('echo "foo" >> /dev/null ' );
495503 $ process ->setTty (true );
496504 $ process ->run ();
@@ -1433,16 +1441,7 @@ public function testRawCommandLine()
14331441 $ p = Process::fromShellCommandline (sprintf ('"%s" -r %s "a" "" "b" ' , self ::$ phpBin , escapeshellarg ('print_r($argv); ' )));
14341442 $ p ->run ();
14351443
1436- $ expected = <<<EOTXT
1437- Array
1438- (
1439- [0] => -
1440- [1] => a
1441- [2] =>
1442- [3] => b
1443- )
1444-
1445- EOTXT ;
1444+ $ expected = "Array \n( \n [0] => - \n [1] => a \n [2] => \n [3] => b \n) \n" ;
14461445 $ this ->assertSame ($ expected , str_replace ('Standard input code ' , '- ' , $ p ->getOutput ()));
14471446 }
14481447
You can’t perform that action at this time.
0 commit comments