3 class DeferredUpdatesTest
extends MediaWikiTestCase
{
5 public function testDoUpdates() {
7 '1' => 'deferred update 1',
8 '2' => 'deferred update 2',
9 '3' => 'deferred update 3',
10 '2-1' => 'deferred update 1 within deferred update 2',
12 DeferredUpdates
::addCallableUpdate(
13 function () use ( $updates ) {
17 DeferredUpdates
::addCallableUpdate(
18 function () use ( $updates ) {
20 DeferredUpdates
::addCallableUpdate(
21 function () use ( $updates ) {
27 DeferredUpdates
::addCallableUpdate(
28 function () use ( $updates ) {
33 $this->expectOutputString( implode( '', $updates ) );
35 DeferredUpdates
::doUpdates();