HEX
Server: Apache/2.4.59 (Debian)
System: Linux keymana 4.19.0-21-cloud-amd64 #1 SMP Debian 4.19.249-2 (2022-06-30) x86_64
User: lijunjie (1003)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //home/lijunjie/swoole-cli/swoole-src-4.8.13/tests/README.md
# PHP Unit-test

Run these tests to make certain that the swoole extension you installed can work well.

## Preparation
try to run `./init` to initialize the databases.

|               | mysql                                 | redis                               |
| ------------- | ------------------------------------- | ----------------------------------- |
| path (env)    | $MYSQL_SERVER_PATH                    | $REDIS_SERVER_PATH                  |
| path (travis) | ${travis}/data/run/mysqld/mysqld.sock | ${travis}/data/run/redis/redis.sock |
| host (raw)    | 127.0.0.1                             | 127.0.0.1                           |
| host (docker) | mysql                                 | redis                               |
| port          | 3306                                  | 6379                                |
| user          | root                                  | -                                   |
| password      | root                                  | root (optional)                     |
| database      | test                                  | 0                                   |

## How to run
1. just run `./start.sh`
2. or use`./start.sh ./swoole_*` command to run a part of the tests
3. or use `./start.sh base` command to run base tests

## Defaults

| Config    | Enable   |
| --------- | -------- |
| show-diff | yes      |
| show-mem  | yes      |
| show-slow | 1000(ms) |

## Log files

| suffix | intro                                         |
| ------ | --------------------------------------------- |
| diff   | show the differents between output and expect |
| out    | script output                                 |
| exp    | expect output                                 |
| log    | all above                                     |
| php    | php temp script file                          |

## Clean
Run `./clean` to remove all of the tests log files.

## Contribute the test script
Run `./new [test-script-filename]`

E.g. : `./new ./swoole_coroutine/co_sleep.phpt`

It will generate the test script file and auto open on your ide (MacOS only).

![](https://cdn.jsdelivr.net/gh/sy-records/staticfile/images/swoole/generate-example.gif)

## Code Style
`PSR1/PSR2`