Skip to content

Commit 240e741

Browse files
Merge branch '5.1' into 5.x
* 5.1: [Process] Dont test TTY if there is no TTY support Fixing some Mongolian translating the validators for european portuguese language Fix CI Update validators.he.xlf Update security.he.xlf Update validators.he.xlf Improve performances in CircualReference detection [PHPUnitBridge] Fixed crash on Windows with PHP 8 Fix session called initized several time
2 parents dfc439a + b25b468 commit 240e741

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

Tests/ProcessTest.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)