3 class CdnCacheUpdateTest
extends MediaWikiTestCase
{
4 public function testPurgeMergeWeb() {
5 $this->setMwGlobals( 'wgCommandLineMode', false );
8 $title = Title
::newMainPage();
9 $urls1[] = $title->getCanonicalURL( '?x=1' );
10 $urls1[] = $title->getCanonicalURL( '?x=2' );
11 $urls1[] = $title->getCanonicalURL( '?x=3' );
12 $update1 = new CdnCacheUpdate( $urls1 );
13 DeferredUpdates
::addUpdate( $update1 );
16 $urls2[] = $title->getCanonicalURL( '?x=2' );
17 $urls2[] = $title->getCanonicalURL( '?x=3' );
18 $urls2[] = $title->getCanonicalURL( '?x=4' );
19 $update2 = new CdnCacheUpdate( $urls2 );
20 DeferredUpdates
::addUpdate( $update2 );
22 $wrapper = TestingAccessWrapper
::newFromObject( $update1 );
23 $this->assertEquals( array_merge( $urls1, $urls2 ), $wrapper->urls
);