yiisoft/yii — pull request #3562 by bkwint (2014-09-30 05:48:15+00:00)
Title: Updated the CMemCache test case such that we can also test with memcached

The current test script allows for the tests to be executed if either the memcache or memcached php module has been loaded into the php engine. But the test case does not set the property $useMemcached if you want to use that. Therefor I introduced the MEMCACHE_USE_MEMCACHED constant to allow for a tester to enable the use of memcached if that has been installed on your machine. Before this fix the test case would throw Exceptions if you would try to use memcached instead of memcache. In the bootstrap you can overwrite the MEMCACHE_USE_MEMCACHED constant by doing

defined('MEMCACHE_USE_MEMCACHED') or define('MEMCACHE_USE_MEMCACHED', true);