1
0
mirror of https://github.com/danog/parallel.git synced 2024-12-02 17:52:14 +01:00
parallel/test/Context/ProcessFifoTest.php
2020-02-11 10:38:30 -06:00

22 lines
573 B
PHP

<?php
namespace Amp\Parallel\Test\Context;
use Amp\Loop;
use Amp\Parallel\Context\Context;
use Amp\Parallel\Context\Internal\ProcessHub;
use Amp\Parallel\Context\Process;
class ProcessFifoTest extends AbstractContextTest
{
public function createContext($script): Context
{
if (\strncasecmp(\PHP_OS, "WIN", 3) === 0) {
$this->markTestSkipped('FIFO pipes do not work on Windows');
}
Loop::setState(Process::class, new ProcessHub(true)); // Manually set ProcessHub using FIFO pipes.
return new Process($script);
}
}