$this->cache1 = new HashBagOStuff();
$this->cache2 = new HashBagOStuff();
- $this->cache = new MultiWriteBagOStuff( array(
- 'caches' => array( $this->cache1, $this->cache2 ),
+ $this->cache = new MultiWriteBagOStuff( [
+ 'caches' => [ $this->cache1, $this->cache2 ],
'replication' => 'async',
'asyncHandler' => 'DeferredUpdates::addCallableUpdate'
- ) );
+ ] );
}
+ /**
+ * @covers MultiWriteBagOStuff::set
+ * @covers MultiWriteBagOStuff::doWrite
+ */
public function testSetImmediate() {
$key = wfRandomString();
$value = wfRandomString();
$this->assertEquals( $value, $this->cache2->get( $key ), 'Written to tier 2' );
}
+ /**
+ * @covers MultiWriteBagOStuff
+ */
public function testSyncMerge() {
$key = wfRandomString();
$value = wfRandomString();
$dbw->commit();
}
+ /**
+ * @covers MultiWriteBagOStuff::set
+ */
public function testSetDelayed() {
$key = wfRandomString();
$value = wfRandomString();