53 $site->setGlobalId(
'dewiki' );
55 $this->assertCount( 0, $store->getSites(),
'0 sites in store' );
57 $store->saveSite( $site );
59 $this->assertCount( 1, $store->getSites(),
'Store has 1 sites' );
60 $this->assertEquals( $site, $store->getSite(
'dewiki' ),
'Store has dewiki' );
72 $site->setGlobalId(
'enwiki' );
73 $site->setLanguageCode(
'en' );
77 $site->setGlobalId(
'eswiki' );
78 $site->setLanguageCode(
'es' );
81 $this->assertCount( 0, $store->getSites(),
'0 sites in store' );
83 $store->saveSites( $sites );
85 $this->assertCount( 2, $store->getSites(),
'Store has 2 sites' );
86 $this->assertTrue( $store->getSites()->hasSite(
'enwiki' ),
'Store has enwiki' );
87 $this->assertTrue( $store->getSites()->hasSite(
'eswiki' ),
'Store has eswiki' );