mirror of
https://github.com/amphp/parallel.git
synced 2025-07-18 12:01:24 +02:00
38 lines
980 B
PHP
38 lines
980 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Amp\Parallel\Test\Context;
|
|
|
|
use Amp\Parallel\Context\Context;
|
|
use Amp\Parallel\Context\ThreadContext;
|
|
use Amp\Parallel\Context\ThreadContextFactory;
|
|
|
|
class ThreadContextTest extends AbstractContextTest
|
|
{
|
|
public function createContext(string|array $script): Context
|
|
{
|
|
if (!ThreadContext::isSupported()) {
|
|
$this->markTestSkipped('ext-parallel required');
|
|
}
|
|
|
|
return (new ThreadContextFactory())->start($script);
|
|
}
|
|
|
|
public function testExitingProcessOnReceive(): void
|
|
{
|
|
// exit() is not supported in threads.
|
|
$this->expectNotToPerformAssertions();
|
|
}
|
|
|
|
public function testExitingProcessOnSend(): void
|
|
{
|
|
// exit() is not supported in threads.
|
|
$this->expectNotToPerformAssertions();
|
|
}
|
|
|
|
public function testExitingProcess(): void
|
|
{
|
|
// exit() is not supported in threads.
|
|
$this->expectNotToPerformAssertions();
|
|
}
|
|
}
|