2017-10-12 20:19:56 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers TransactionRoundDefiningUpdate
|
|
|
|
|
*/
|
2019-07-07 23:28:25 +00:00
|
|
|
class TransactionRoundDefiningUpdateTest extends MediaWikiUnitTestCase {
|
2017-12-29 23:22:37 +00:00
|
|
|
|
2017-10-12 20:19:56 +00:00
|
|
|
public function testDoUpdate() {
|
|
|
|
|
$ran = 0;
|
|
|
|
|
$update = new TransactionRoundDefiningUpdate( function () use ( &$ran ) {
|
|
|
|
|
$ran++;
|
|
|
|
|
} );
|
|
|
|
|
$this->assertSame( 0, $ran );
|
|
|
|
|
$update->doUpdate();
|
|
|
|
|
$this->assertSame( 1, $ran );
|
|
|
|
|
}
|
|
|
|
|
}
|