wiki.techinc.nl/tests/phpunit/includes/libs/objectcache/MemcachedPeclBagOStuffIntegrationTest.php
Tim Starling e582572622 Improve ObjectCache integration tests
* Add BagOStuffTest subclasses for all core BagOStuff subclasses,
  replacing PHPUNIT_USE_BAGOSTUFF, as suggested in a todo comment.
* Add config $wgEnableRemoteBagOStuffTests which causes all tests
  enabled by $wgObjectCache to execute, which means that the memcached
  tests are executed by default.

I have verified all except RESTBagOStuff and WinCacheBagOStuff. The
memcached tests fail against memcached 1.5.x but pass against memcached
1.6.x.

Bug: T90875
Change-Id: Id74b5226669f8cb857f859fbc35bc58ab001e873
2022-02-11 10:20:33 +11:00

15 lines
412 B
PHP

<?php
/**
* @group BagOStuff
* @covers MemcachedPeclBagOStuff
* @requires extension memcached
*/
class MemcachedPeclBagOStuffIntegrationTest extends BagOStuffTestBase {
protected function newCacheInstance() {
if ( !$this->getConfVar( 'EnableRemoteBagOStuffTests' ) ) {
$this->markTestSkipped( '$wgEnableRemoteBagOStuffTests is false' );
}
return ObjectCache::getInstance( 'memcached-pecl' );
}
}