| 1 | <?php |
| 2 | |
| 3 | use MediaWiki\Deferred\TransactionRoundDefiningUpdate; |
| 4 | |
| 5 | /** |
| 6 | * @covers \MediaWiki\Deferred\TransactionRoundDefiningUpdate |
| 7 | */ |
| 8 | class TransactionRoundDefiningUpdateTest extends MediaWikiUnitTestCase { |
| 9 | |
| 10 | public function testDoUpdate() { |
| 11 | $ran = 0; |
| 12 | $update = new TransactionRoundDefiningUpdate( static function () use ( &$ran ) { |
| 13 | $ran++; |
| 14 | } ); |
| 15 | $this->assertSame( 0, $ran ); |
| 16 | $update->doUpdate(); |
| 17 | $this->assertSame( 1, $ran ); |
| 18 | } |
| 19 | } |