objectcache: Disable RedisBagOStuff constructor in unit test
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 25 Jul 2016 15:53:03 +0000 (16:53 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 25 Jul 2016 15:55:36 +0000 (16:55 +0100)
commite1decd825d937e4f952f3e2a913946314f9f9cc4
treeb006425dd606a44c36618b504f0fc901f238d886
parentf9fe45cbd98a202b5cedfae0a979eedd8c39ae0a
objectcache: Disable RedisBagOStuff constructor in unit test

Follows-up c4e698dc2. The tests are failing on Travis CI because
php5-redis isn't installed by default. These tests shouldn't need
that to be installed (and even then, we should skip gracefully as
it is an optional dependency).

> RedisBagOStuffTest::testUnserialize with data set #0
> Exception: RedisConnectionPool requires a Redis client library.
> ./mediawiki/includes/clientpool/RedisConnectionPool.php:86

Fixed by using a mock and disabling the original constructor.

Change-Id: Icced7c30a75516c2118489ad29eac2aa5cff80ad
tests/phpunit/includes/objectcache/RedisBagOStuffTest.php