Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 42535bd

Browse files
Added unit test information to readme
1 parent 16438cb commit 42535bd

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.markdown

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,29 @@ See [dedicated page](https://github.com/phpredis/phpredis/blob/master/arrays.mar
109109

110110
See [dedicated page](https://github.com/phpredis/phpredis/blob/feature/redis_cluster/cluster.markdown#readme).
111111

112+
## Running the unit tests
113+
phpredis uses a small custom unit test suite for testing functionality of the various classes. To run tests, simply do the following:
114+
115+
<pre>
116+
# Run tests for Redis class (note this is the default)
117+
php tests/TestRedis.php --class Redis
118+
119+
# Run tests for RedisArray class
120+
tests/mkring.sh
121+
php tests/TestRedis.php --class RedisArray
122+
123+
# Run tests for the RedisCluster class
124+
test/make-cluster.sh start
125+
php tests/TestRedis.php --class RedisCluster
126+
</pre>
127+
128+
Note that it is possible to run only tests which match a substring of the test itself by passing the additional argument '--test <str>' when invoking.
129+
130+
<pre>
131+
# Just run the 'echo' test
132+
php tests/TestRedis.php --class Redis --test echo
133+
</pre>
134+
112135
# Classes and methods
113136
-----
114137

0 commit comments

Comments
 (0)