Create a simple APCUBagOStuff subclass and also fix APCUBagOStuff::incrWithInit() default $init value. Change-Id: If84963fe7dcfedd6edebfb8785235263e0868ece
21 lines
448 B
PHP
21 lines
448 B
PHP
<?php
|
|
|
|
/**
|
|
* @group BagOStuff
|
|
* @covers BagOStuff
|
|
*/
|
|
class BagOStuffTest extends BagOStuffTestBase {
|
|
protected function newCacheInstance() {
|
|
if ( $this->getCliArg( 'use-bagostuff' ) !== null ) {
|
|
global $wgObjectCaches;
|
|
|
|
$id = $this->getCliArg( 'use-bagostuff' );
|
|
$cache = ObjectCache::newFromParams( $wgObjectCaches[$id] );
|
|
} else {
|
|
// no type defined - use simple hash
|
|
$cache = new HashBagOStuff;
|
|
}
|
|
|
|
return $cache;
|
|
}
|
|
}
|