MediaWiki REL1_31
TransactionRoundDefiningUpdateTest.php
Go to the documentation of this file.
1<?php
2
6class TransactionRoundDefiningUpdateTest extends PHPUnit\Framework\TestCase {
7
8 use MediaWikiCoversValidator;
9
10 public function testDoUpdate() {
11 $ran = 0;
12 $update = new TransactionRoundDefiningUpdate( function () use ( &$ran ) {
13 $ran++;
14 } );
15 $this->assertSame( 0, $ran );
16 $update->doUpdate();
17 $this->assertSame( 1, $ran );
18 }
19}
Deferrable update that must run outside of any explicit LBFactory transaction round.