add phpunit windows support

This commit is contained in:
crazywhalecc
2022-08-22 20:54:14 +08:00
parent 2e61e2a366
commit 15383a6b92
7 changed files with 88 additions and 12 deletions

View File

@@ -97,7 +97,9 @@ class WorkerEventListener
public function onWorkerStop999()
{
logger()->debug('Worker #' . ProcessManager::getProcessId() . ' stopping');
ProcessStateManager::removeProcessState(ZM_PROCESS_WORKER, ProcessManager::getProcessId());
if (DIRECTORY_SEPARATOR !== '\\') {
ProcessStateManager::removeProcessState(ZM_PROCESS_WORKER, ProcessManager::getProcessId());
}
}
/**

View File

@@ -12,7 +12,7 @@ class ProcessStateManager
/**
* @var array
*/
public static $process_mode;
public static array $process_mode = [];
/**
* @param null|int|string $id_or_name

View File

@@ -0,0 +1,20 @@
<?php
declare(strict_types=1);
namespace ZM\Store;
class MockAtomic
{
private int $num = 0;
public function set(int $num)
{
$this->num = $num;
}
public function get(): int
{
return $this->num;
}
}