コード例 #1
0
ファイル: TestSites.php プロジェクト: mb720/mediawiki
 /**
  * Inserts sites into the database for the unit tests that need them.
  *
  * @since 0.1
  */
 public static function insertIntoDb()
 {
     $sitesTable = new DBSiteStore();
     $sitesTable->clear();
     $sitesTable->saveSites(TestSites::getSites());
 }
コード例 #2
0
 /**
  * @covers DBSiteStore::clear
  */
 public function testClear()
 {
     $store = new DBSiteStore();
     $this->assertTrue($store->clear());
     $site = $store->getSite('enwiki');
     $this->assertNull($site);
     $sites = $store->getSites();
     $this->assertEquals(0, $sites->count());
 }