|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| include/ | H | 03-May-2022 | - | 8,448 | 6,523 |
| swoole_atomic/ | H | 03-May-2022 | - | 183 | 162 |
| swoole_channel_coro/ | H | 03-May-2022 | - | 1,900 | 1,695 |
| swoole_client_coro/ | H | 03-May-2022 | - | 2,318 | 2,097 |
| swoole_client_sync/ | H | 03-May-2022 | - | 1,298 | 1,140 |
| swoole_coroutine/ | H | 03-May-2022 | - | 4,313 | 3,908 |
| swoole_coroutine_scheduler/ | H | 03-May-2022 | - | 1,032 | 906 |
| swoole_coroutine_system/ | H | 03-May-2022 | - | 447 | 385 |
| swoole_coroutine_util/ | H | 03-May-2022 | - | 306 | 264 |
| swoole_coroutine_wait_group/ | H | 03-May-2022 | - | 88 | 85 |
| swoole_curl/ | H | 03-May-2022 | - | 4,184 | 3,521 |
| swoole_event/ | H | 03-May-2022 | - | 516 | 425 |
| swoole_feature/ | H | 03-May-2022 | - | 1,131 | 1,099 |
| swoole_function/ | H | 03-May-2022 | - | 219 | 187 |
| swoole_global/ | H | 03-May-2022 | - | 243 | 232 |
| swoole_http2_client_coro/ | H | 03-May-2022 | - | 935 | 892 |
| swoole_http2_server/ | H | 03-May-2022 | - | 622 | 599 |
| swoole_http2_server_coro/ | H | 03-May-2022 | - | 64 | 60 |
| swoole_http_client_coro/ | H | 03-May-2022 | - | 3,240 | 2,958 |
| swoole_http_server/ | H | 03-May-2022 | - | 4,950 | 4,490 |
| swoole_http_server_coro/ | H | 03-May-2022 | - | 1,681 | 1,507 |
| swoole_library/ | H | 03-May-2022 | - | 236 | 215 |
| swoole_lock/ | H | 03-May-2022 | - | 128 | 110 |
| swoole_mysql_coro/ | H | 03-May-2022 | - | 2,309 | 2,150 |
| swoole_process/ | H | 03-May-2022 | - | 1,375 | 1,163 |
| swoole_process_pool/ | H | 03-May-2022 | - | 814 | 690 |
| swoole_redis_coro/ | H | 03-May-2022 | - | 2,110 | 1,842 |
| swoole_redis_server/ | H | 03-May-2022 | - | 134 | 119 |
| swoole_runtime/ | H | 03-May-2022 | - | 6,404 | 5,617 |
| swoole_server/ | H | 03-May-2022 | - | 12,168 | 10,883 |
| swoole_server_coro/ | H | 03-May-2022 | - | 263 | 224 |
| swoole_server_port/ | H | 03-May-2022 | - | 755 | 677 |
| swoole_socket_coro/ | H | 03-May-2022 | - | 2,685 | 2,372 |
| swoole_table/ | H | 03-May-2022 | - | 732 | 609 |
| swoole_timer/ | H | 03-May-2022 | - | 1,003 | 920 |
| swoole_websocket_server/ | H | 03-May-2022 | - | 1,791 | 1,725 |
| CONTRIBUTION | H A D | 24-Dec-2021 | 159 | 4 | 3 |
| README.md | H A D | 24-Dec-2021 | 2.2 KiB | 56 | 41 |
| clean | H A D | 24-Dec-2021 | 744 | 31 | 29 |
| init | H A D | 24-Dec-2021 | 1.7 KiB | 63 | 58 |
| new | H A D | 24-Dec-2021 | 3.3 KiB | 116 | 100 |
| php-cs-fixer | H A D | 24-Dec-2021 | 83 | 5 | 1 |
| run-tests | H A D | 24-Dec-2021 | 128 KiB | 3,757 | 2,937 |
| start.sh | H A D | 24-Dec-2021 | 1.4 KiB | 63 | 53 |
| template | H A D | 24-Dec-2021 | 356 | 19 | 16 |
| test.sql | H A D | 24-Dec-2021 | 4.8 KiB | 120 | 74 |
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