Merge "rdbms: avoid LoadBalancer::getConnection waste when using $groups"
[lhc/web/wiklou.git] / tests / phpunit / includes / deferred / TransactionRoundDefiningUpdateTest.php
1 <?php
2
3 /**
4 * @covers TransactionRoundDefiningUpdate
5 */
6 class 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 }