17 $update1->merge( $update2 );
18 $wrapped = TestingAccessWrapper::newFromObject( $update1 );
20 $this->assertEquals( 1, $wrapped->pages );
21 $this->assertEquals( 3, $wrapped->users );
22 $this->assertEquals( 1, $wrapped->images );
23 $this->assertEquals( 0, $wrapped->edits );
24 $this->assertEquals( 0, $wrapped->articles );
37 $statsInit->refresh();
45 $dbw->begin( __METHOD__ );
48 $this->assertEquals( 0, DeferredUpdates::pendingUpdatesCount() );
50 $this->assertEquals( 1, DeferredUpdates::pendingUpdatesCount() );
59 $this->assertEquals( 1, DeferredUpdates::pendingUpdatesCount() );
61 $dbw->commit( __METHOD__ );
63 $this->assertEquals( 1, DeferredUpdates::pendingUpdatesCount() );
64 DeferredUpdates::doUpdates();
65 $this->assertEquals( 0, DeferredUpdates::pendingUpdatesCount() );
75 $statsInit->refresh();