• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

include/H03-May-2022-8,4486,523

swoole_atomic/H03-May-2022-183162

swoole_channel_coro/H03-May-2022-1,9001,695

swoole_client_coro/H03-May-2022-2,3182,097

swoole_client_sync/H03-May-2022-1,2981,140

swoole_coroutine/H03-May-2022-4,3133,908

swoole_coroutine_scheduler/H03-May-2022-1,032906

swoole_coroutine_system/H03-May-2022-447385

swoole_coroutine_util/H03-May-2022-306264

swoole_coroutine_wait_group/H03-May-2022-8885

swoole_curl/H03-May-2022-4,1843,521

swoole_event/H03-May-2022-516425

swoole_feature/H03-May-2022-1,1311,099

swoole_function/H03-May-2022-219187

swoole_global/H03-May-2022-243232

swoole_http2_client_coro/H03-May-2022-935892

swoole_http2_server/H03-May-2022-622599

swoole_http2_server_coro/H03-May-2022-6460

swoole_http_client_coro/H03-May-2022-3,2402,958

swoole_http_server/H03-May-2022-4,9504,490

swoole_http_server_coro/H03-May-2022-1,6811,507

swoole_library/H03-May-2022-236215

swoole_lock/H03-May-2022-128110

swoole_mysql_coro/H03-May-2022-2,3092,150

swoole_process/H03-May-2022-1,3751,163

swoole_process_pool/H03-May-2022-814690

swoole_redis_coro/H03-May-2022-2,1101,842

swoole_redis_server/H03-May-2022-134119

swoole_runtime/H03-May-2022-6,4045,617

swoole_server/H03-May-2022-12,16810,883

swoole_server_coro/H03-May-2022-263224

swoole_server_port/H03-May-2022-755677

swoole_socket_coro/H03-May-2022-2,6852,372

swoole_table/H03-May-2022-732609

swoole_timer/H03-May-2022-1,003920

swoole_websocket_server/H03-May-2022-1,7911,725

CONTRIBUTIONH A D24-Dec-2021159 43

README.mdH A D24-Dec-20212.2 KiB5641

cleanH A D24-Dec-2021744 3129

initH A D24-Dec-20211.7 KiB6358

newH A D24-Dec-20213.3 KiB116100

php-cs-fixerH A D24-Dec-202183 51

run-testsH A D24-Dec-2021128 KiB3,7572,937

start.shH A D24-Dec-20211.4 KiB6353

templateH A D24-Dec-2021356 1916

test.sqlH A D24-Dec-20214.8 KiB12074

README.md

1# PHP Unit-test
2
3Run these tests to make certain that the swoole extension you installed can work well.
4
5## Preparation
6try to run `./init` to initialize the databases.
7
8|               | mysql                                 | redis                               |
9| ------------- | ------------------------------------- | ----------------------------------- |
10| path (env)    | $MYSQL_SERVER_PATH                    | $REDIS_SERVER_PATH                  |
11| path (travis) | ${travis}/data/run/mysqld/mysqld.sock | ${travis}/data/run/redis/redis.sock |
12| host (raw)    | 127.0.0.1                             | 127.0.0.1                           |
13| host (docker) | mysql                                 | redis                               |
14| port          | 3306                                  | 6379                                |
15| user          | root                                  | -                                   |
16| password      | root                                  | root (optional)                     |
17| database      | test                                  | 0                                   |
18
19## How to run
201. just run `./start.sh`
212. or use`./start.sh ./swoole_*` command to run a part of the tests
223. or use `./start.sh base` command to run base tests
23
24## Defaults
25
26| Config    | Enable   |
27| --------- | -------- |
28| show-diff | yes      |
29| show-mem  | yes      |
30| show-slow | 1000(ms) |
31
32## Log files
33
34| suffix | intro                                         |
35| ------ | --------------------------------------------- |
36| diff   | show the differents between output and expect |
37| out    | script output                                 |
38| exp    | expect output                                 |
39| log    | all above                                     |
40| php    | php temp script file                          |
41
42## Clean
43Run `./clean` to remove all of the tests log files.
44
45## Contribute the test script
46Run `./new [test-script-filename]`
47
48E.g. : `./new ./swoole_coroutine/co_sleep.phpt`
49
50It will generate the test script file and auto open on your ide (MacOS only).
51
52![](https://cdn.jsdelivr.net/gh/sy-records/staticfile/images/swoole/generate-example.gif)
53
54## Code Style
55`PSR1/PSR2`
56