瀏覽代碼

Use Worker::$command instead of $argv

Refer https://github.com/walkor/workerman/pull/907
walkor 2 年之前
父節點
當前提交
ca4bcaf0bd
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      tests/Feature/UdpConnectionTest.php

+ 1 - 2
tests/Feature/UdpConnectionTest.php

@@ -20,8 +20,7 @@ beforeAll(function () use ($serverAddress) {
             }
             \$connection->send('received: '.\$data);
         };
-        global \$argv;
-        \$argv = ['', 'start'];
+        Worker::$command = 'start';
         Worker::runAll();
     PHP
     );