+
+ /**
+ * @dataProvider provideGetWikiIdFromDomain
+ * @covers WikiMap::getWikiIdFromDomain()
+ */
+ public function testGetWikiIdFromDomain( $domain, $wikiId ) {
+ $this->assertEquals( $wikiId, WikiMap::getWikiIdFromDomain( $domain ) );
+ }
+
+ public function provideGetWikiIdFromDomain() {
+ return [
+ [ 'db-prefix', 'db-prefix' ],
+ [ wfWikiID(), wfWikiID() ],
+ [ new DatabaseDomain( 'db-dash', null, 'prefix' ), 'db-dash-prefix' ]
+ ];
+ }