Page MenuHomeWickedGov Phorge

ObjectCacheFactoryTest.php
No OneTemporary

Size
889 B
Referenced Files
None
Subscribers
None

ObjectCacheFactoryTest.php

<?php
use MediaWiki\Config\ServiceOptions;
use MediaWiki\Logger\NullSpi;
use Wikimedia\ObjectCache\HashBagOStuff;
use Wikimedia\Stats\StatsFactory;
/**
* @covers ObjectCacheFactory
*/
class ObjectCacheFactoryTest extends MediaWikiUnitTestCase {
private function newObjectCacheFactory() {
return new ObjectCacheFactory(
$this->createMock( ServiceOptions::class ),
StatsFactory::newNull(),
new NullSpi(),
static function () {
},
'testWikiId'
);
}
public function testNewObjectCacheFactory() {
$this->assertInstanceOf(
ObjectCacheFactory::class,
$this->newObjectCacheFactory()
);
}
public function testNewFromParams() {
$factory = $this->newObjectCacheFactory();
$objCache = $factory->newFromParams( [
'class' => HashBagOStuff::class,
'args' => [ 'foo', 'bar' ],
] );
$this->assertInstanceOf( HashBagOStuff::class, $objCache );
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 18 2026, 09:50 (6 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
13/94/f3fc16bb23384d8b007eb5da315c
Default Alt Text
ObjectCacheFactoryTest.php (889 B)

Event Timeline