40 $site->setGlobalId(
'foobar' );
44 $site->setGlobalId(
'enwiktionary' );
45 $site->setGroup(
'wiktionary' );
46 $site->setLanguageCode(
'en' );
47 $site->addNavigationId(
'enwiktionary' );
53 $site->setGlobalId(
'dewiktionary' );
54 $site->setGroup(
'wiktionary' );
55 $site->setLanguageCode(
'de' );
56 $site->addInterwikiId(
'dewiktionary' );
57 $site->addInterwikiId(
'wiktionaryde' );
63 $site->setGlobalId(
'spam' );
64 $site->setGroup(
'spam' );
65 $site->setLanguageCode(
'en' );
66 $site->addNavigationId(
'spam' );
67 $site->addNavigationId(
'spamz' );
68 $site->addInterwikiId(
'spamzz' );
69 $site->setLinkPath(
"http://spamzz.test/testing/" );
87 foreach ( $languageCodes
as $langCode ) {
89 $site->setGlobalId( $langCode .
'wiki' );
90 $site->setGroup(
'wikipedia' );
91 $site->setLanguageCode( $langCode );
92 $site->addInterwikiId( $langCode );
93 $site->addNavigationId( $langCode );
108 $sitesTable = \MediaWiki\MediaWikiServices::getInstance()->getSiteStore();
109 $sitesTable->clear();
110 $sitesTable->saveSites( self::getSites() );