Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
include
swoole_atomic
swoole_channel_coro
swoole_client_async
swoole_client_coro
swoole_client_sync
swoole_coroutine
swoole_coroutine_scheduler
swoole_coroutine_server
swoole_coroutine_system
swoole_coroutine_util
swoole_coroutine_wait_group
swoole_event
swoole_feature
swoole_function
swoole_global
swoole_http2_client_coro
swoole_http2_server
swoole_http_client_coro
swoole_http_server
swoole_http_server_coro
swoole_library
swoole_mysql_coro
swoole_process
swoole_process_pool
swoole_redis_coro
swoole_redis_server
swoole_runtime
swoole_server
swoole_server_port
swoole_socket_coro
swoole_table
swoole_timer
swoole_websocket_server
CONTRIBUTION
README.md
clean
init
new
run-tests
start.sh
template
test.sql

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).

You can’t perform that action at this time.