37 unlink( $this->cacheFile );
42 $cacheBuilder->build();
44 $contents = file_get_contents( $this->cacheFile );
45 $this->assertEquals( json_encode( $this->
getExpectedData() ), $contents );
52 'globalid' =>
'foobar',
65 'globalid' =>
'enwiktionary',
66 'type' =>
'mediawiki',
67 'group' =>
'wiktionary',
71 'equivalent' => [
'enwiktionary' ]
76 'page_path' =>
'https://en.wiktionary.org/wiki/$1',
77 'file_path' =>
'https://en.wiktionary.org/w/$1'
84 'type' =>
'equivalent',
85 'key' =>
'enwiktionary'
101 $siteLookup = $this->getMockBuilder(
'SiteLookup' )
102 ->disableOriginalConstructor()
105 $siteLookup->expects( $this->
any() )
106 ->method(
'getSites' )
107 ->will( $this->returnValue( $sites ) );
116 $site->setGlobalId(
'foobar' );
120 $site->setGlobalId(
'enwiktionary' );
121 $site->setGroup(
'wiktionary' );
122 $site->setLanguageCode(
'en' );
123 $site->addNavigationId(
'enwiktionary' );
132 return tempnam( sys_get_temp_dir(),
'mw-test-sitelist' );