37 unlink( $this->cacheFile );
43 $cacheBuilder->build();
46 $this->assertEquals( $sites,
$cache->getSites() );
52 $cacheBuilder->build();
56 $this->assertEquals( $sites->getSite(
'enwiktionary' ),
$cache->getSite(
'enwiktionary' ) );
67 $siteLookup = $this->getMockBuilder(
'SiteLookup' )
68 ->disableOriginalConstructor()
71 $siteLookup->expects( $this->
any() )
72 ->method(
'getSites' )
73 ->will( $this->returnValue( $sites ) );
82 $site->setGlobalId(
'foobar' );
86 $site->setGlobalId(
'enwiktionary' );
87 $site->setGroup(
'wiktionary' );
88 $site->setLanguageCode(
'en' );
89 $site->addNavigationId(
'enwiktionary' );
98 return tempnam( sys_get_temp_dir(),
'mw-test-sitelist' );