You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
29
vendor/swoole/tests/swoole_http_client/get.phpt
vendored
Executable file
29
vendor/swoole/tests/swoole_http_client/get.phpt
vendored
Executable file
@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
swoole_http_client: get
|
||||
--SKIPIF--
|
||||
<?php require __DIR__ . '/../include/skipif.inc'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once __DIR__ . '/../include/bootstrap.php';
|
||||
require_once __DIR__ . '/../include/swoole.inc';
|
||||
|
||||
$pm = new ProcessManager;
|
||||
$pm->parentFunc = function ($pid)
|
||||
{
|
||||
echo file_get_contents("http://127.0.0.1:9501/");
|
||||
swoole_process::kill($pid);
|
||||
};
|
||||
|
||||
$pm->childFunc = function () use ($pm)
|
||||
{
|
||||
include __DIR__ . "/../include/api/http_server.php";
|
||||
};
|
||||
|
||||
$pm->childFirst();
|
||||
$pm->run();
|
||||
?>
|
||||
Done
|
||||
--EXPECTREGEX--
|
||||
swoole
|
||||
Done.*
|
||||
--CLEAN--
|
Reference in New Issue
Block a user