+
+%if %{with tests}
+TEST_PHP_ARGS="
+ $TEST_PHP_ARGS
+ -dextension=%{php_extensiondir}/zlib.so \
+"
+
+# Run tests for Redis class (note this is the default)
+$TEST_PHP_EXECUTABLE $TEST_PHP_ARGS tests/TestRedis.php --class Redis
+
+# Run tests for RedisArray class
+tests/mkring.sh start
+$TEST_PHP_EXECUTABLE $TEST_PHP_ARGS tests/TestRedis.php --class RedisArray
+tests/mkring.sh stop
+
+# Run tests for the RedisCluster class
+tests/make-cluster.sh start
+$TEST_PHP_EXECUTABLE $TEST_PHP_ARGS tests/TestRedis.php --class RedisCluster
+tests/make-cluster.sh stop