Merge "Remove INSERT value for page_counter variable"
[lhc/web/wiklou.git] / tests / phpunit / includes / deferred / CdnCacheUpdateTest.php
1 <?php
2
3 class CdnCacheUpdateTest extends MediaWikiTestCase {
4 public function testPurgeMergeWeb() {
5 $this->setMwGlobals( 'wgCommandLineMode', false );
6
7 $urls1 = array();
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 );
14
15 $urls2 = array();
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 );
21
22 $wrapper = TestingAccessWrapper::newFromObject( $update1 );
23 $this->assertEquals( array_merge( $urls1, $urls2 ), $wrapper->urls );
24 }
25 }