diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-01 00:48:21 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2012-12-01 00:48:21 -0500 |
commit | c852044d6eecc0a652800b1661491c0f9c545054 (patch) | |
tree | 3b5777cf4fa1c3fb76293c227e1eb86d7171e187 /tests/test_framework/phpbb_test_case_helpers.php | |
parent | 3a702084e4249830a87dc0914127e00c1bb1b1dd (diff) | |
download | forums-c852044d6eecc0a652800b1661491c0f9c545054.tar forums-c852044d6eecc0a652800b1661491c0f9c545054.tar.gz forums-c852044d6eecc0a652800b1661491c0f9c545054.tar.bz2 forums-c852044d6eecc0a652800b1661491c0f9c545054.tar.xz forums-c852044d6eecc0a652800b1661491c0f9c545054.zip |
[ticket/9983] Add redis cache driver tests.
In order to not overwrite data in default redis store, at least
one of redis host or post must be explicitly specified.
Redis cache driver constructor has been modified to accept
host and port as parameters. This was not added to public API
as there are more parameters being passed via global constants.
PHPBB3-9983
Diffstat (limited to 'tests/test_framework/phpbb_test_case_helpers.php')
-rw-r--r-- | tests/test_framework/phpbb_test_case_helpers.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index d10645a732..b56a699d1c 100644 --- a/tests/test_framework/phpbb_test_case_helpers.php +++ b/tests/test_framework/phpbb_test_case_helpers.php @@ -91,6 +91,15 @@ class phpbb_test_case_helpers { $config['phpbb_functional_url'] = $phpbb_functional_url; } + + if (isset($redis_host)) + { + $config['redis_host'] = $redis_host; + } + if (isset($redis_port)) + { + $config['redis_port'] = $redis_port; + } } if (isset($_SERVER['PHPBB_TEST_DBMS'])) @@ -113,6 +122,16 @@ class phpbb_test_case_helpers )); } + if (isset($_SERVER['PHPBB_TEST_REDIS_HOST'])) + { + $config['redis_host'] = $_SERVER['PHPBB_TEST_REDIS_HOST']; + } + + if (isset($_SERVER['PHPBB_TEST_REDIS_PORT'])) + { + $config['redis_port'] = $_SERVER['PHPBB_TEST_REDIS_PORT']; + } + return $config; } |