6 * @covers \SqlBagOStuff
8 class SqlBagOStuffMultiPrimaryIntegrationTest
extends BagOStuffTestBase
{
9 protected function newCacheInstance() {
10 return $this->getServiceContainer()->getObjectCacheFactory()->newFromParams( [
11 'class' => SqlBagOStuff
::class,
12 'loggroup' => 'SQLBagOStuff',
13 'multiPrimaryMode' => true,
15 'reportDupes' => false
19 public function testModtoken() {
20 $now = self
::TEST_TIME
;
21 $this->cache
->setMockTime( $now );
22 $this->cache
->set( 'test', 'a' );
23 $this->assertSame( 'a', $this->cache
->get( 'test' ) );
26 // Modtoken comparison makes this a no-op
27 $this->cache
->set( 'test', 'b' );
28 $this->assertSame( 'a', $this->cache
->get( 'test' ) );
31 $this->cache
->set( 'test', 'c' );
32 $this->assertSame( 'c', $this->cache
->get( 'test' ) );