public function testAll() { $database_commits = Database_Commits::getInstance(); $bible = "phpunit"; $sha = "sha"; $data = $database_commits->get($bible); $this->assertEmpty($data); // Record some data. $database_commits->record($bible, $sha); $database_commits->record($bible, $sha); // Check the data. $data = $database_commits->get($bible); $this->assertEquals(2, count($data)); $this->assertEquals("sha", $data[1]); // No data for another Bible $data = $database_commits->get("none"); $this->assertEquals(0, count($data)); }
$database->optimize(); $database = Database_Ipc::getInstance(); $database->trim(); $database = Database_Notes::getInstance(); $database->trim(); if (!$client_mode) { $database->trim_server(); } $database->optimize(); $database = Database_Shell::getInstance(); $database->trim(); $database->optimize(); $database = Database_Check::getInstance(); $database->optimize(); unlink("../databases/volatile.sqlite"); $database = Database_Volatile::getInstance(); $database->create(); $database = Database_Sprint::getInstance(); $database->optimize(); unlink("../databases/navigation.sqlite"); $database = Database_Navigation::getInstance(); $database->create(); $database = Database_History::getInstance(); $database->optimize(); $database = Database_Commits::getInstance(); $database->optimize(); $database = Database_Jobs::getInstance(); $database->trim(); $database->optimize(); $database = Database_Config_User::getInstance(); $database->trim();