From 2e44b49a2db3026050b136de9b00f749dd3ff939 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 25 Apr 2014 06:26:49 +0200 Subject: Update to MediaWiki 1.22.6 --- tests/phpunit/includes/site/TestSites.php | 100 ------------------------------ 1 file changed, 100 deletions(-) delete mode 100644 tests/phpunit/includes/site/TestSites.php (limited to 'tests/phpunit/includes/site/TestSites.php') diff --git a/tests/phpunit/includes/site/TestSites.php b/tests/phpunit/includes/site/TestSites.php deleted file mode 100644 index f224b7d7..00000000 --- a/tests/phpunit/includes/site/TestSites.php +++ /dev/null @@ -1,100 +0,0 @@ - - */ -class TestSites { - - /** - * @since 1.21 - * - * @return array - */ - public static function getSites() { - $sites = array(); - - $site = new Site(); - $site->setGlobalId( 'foobar' ); - $sites[] = $site; - - $site = new MediaWikiSite(); - $site->setGlobalId( 'enwiktionary' ); - $site->setGroup( 'wiktionary' ); - $site->setLanguageCode( 'en' ); - $site->addNavigationId( 'enwiktionary' ); - $site->setPath( MediaWikiSite::PATH_PAGE, "https://en.wiktionary.org/wiki/$1" ); - $site->setPath( MediaWikiSite::PATH_FILE, "https://en.wiktionary.org/w/$1" ); - $sites[] = $site; - - $site = new MediaWikiSite(); - $site->setGlobalId( 'dewiktionary' ); - $site->setGroup( 'wiktionary' ); - $site->setLanguageCode( 'de' ); - $site->addInterwikiId( 'dewiktionary' ); - $site->addInterwikiId( 'wiktionaryde' ); - $site->setPath( MediaWikiSite::PATH_PAGE, "https://de.wiktionary.org/wiki/$1" ); - $site->setPath( MediaWikiSite::PATH_FILE, "https://de.wiktionary.org/w/$1" ); - $sites[] = $site; - - $site = new Site(); - $site->setGlobalId( 'spam' ); - $site->setGroup( 'spam' ); - $site->setLanguageCode( 'en' ); - $site->addNavigationId( 'spam' ); - $site->addNavigationId( 'spamz' ); - $site->addInterwikiId( 'spamzz' ); - $site->setLinkPath( "http://spamzz.test/testing/" ); - $sites[] = $site; - - foreach ( array( 'en', 'de', 'nl', 'sv', 'sr', 'no', 'nn' ) as $langCode ) { - $site = new MediaWikiSite(); - $site->setGlobalId( $langCode . 'wiki' ); - $site->setGroup( 'wikipedia' ); - $site->setLanguageCode( $langCode ); - $site->addInterwikiId( $langCode ); - $site->addNavigationId( $langCode ); - $site->setPath( MediaWikiSite::PATH_PAGE, "https://$langCode.wikipedia.org/wiki/$1" ); - $site->setPath( MediaWikiSite::PATH_FILE, "https://$langCode.wikipedia.org/w/$1" ); - $sites[] = $site; - } - - return $sites; - } - - /** - * Inserts sites into the database for the unit tests that need them. - * - * @since 0.1 - */ - public static function insertIntoDb() { - $sitesTable = SiteSQLStore::newInstance(); - $sitesTable->clear(); - $sitesTable->saveSites( TestSites::getSites() ); - } -} -- cgit v1.2.3-54-g00ecf