/** * 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()); }
/** * @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()); }