#!/bin/sh

set -e

export HASHTABLE_MEMCACHE_TEST_CONFIG='{"hashtable": {"memcache": {"hostspec":["localhost"],"port":[11211]}}}'
export HASHTABLE_PREDIS_TEST_CONFIG='{"hashtable": {"predis": {"hostspec":["localhost"],"scheme":"tcp","database":"15"}}}'

cd Horde_HashTable*/test/./Horde/HashTable

# We drop privileges to run tests
touch .phpunit.result.cache
chown www-data:www-data .phpunit.result.cache
su www-data --preserve-environment --shell /bin/sh --command 'phpunit -v .'
