本文整理匯總了PHP中Piwik::dropDatabase方法的典型用法代碼示例。如果您正苦於以下問題:PHP Piwik::dropDatabase方法的具體用法?PHP Piwik::dropDatabase怎麽用?PHP Piwik::dropDatabase使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Piwik
的用法示例。
在下文中一共展示了Piwik::dropDatabase方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
function __construct($title = '')
{
parent::__construct($title);
print "The test class extends Test_Database: the test Piwik database is created once in the constructor, and all tables are truncated at the end of EACH unit test method.<br>";
Piwik::createConfigObject();
Piwik::createDatabaseObject();
Zend_Registry::get('config')->setTestEnvironment();
Zend_Registry::get('config')->disableSavingConfigurationFileUpdates();
Piwik::createLogObject();
Piwik::dropDatabase();
Piwik::createDatabase();
Piwik::disconnectDatabase();
Piwik::createDatabaseObject();
Piwik::createTables();
}
示例2: __construct
function __construct($title = '')
{
parent::__construct($title);
try {
Piwik::createConfigObject();
Piwik_Config::getInstance()->setTestEnvironment();
Piwik::createDatabaseObject();
Piwik::createLogObject();
Piwik::dropDatabase();
Piwik::createDatabase();
Piwik::disconnectDatabase();
Piwik::createDatabaseObject();
Piwik::createTables();
Piwik_PluginsManager::getInstance()->installLoadedPlugins();
} catch (Exception $e) {
echo $e->getMessage();
echo "<br/><b>TEST INITIALIZATION FAILED!";
throw $e;
}
}
示例3: tearDown
/**
* Resets all caches and drops the database
*/
public function tearDown()
{
parent::tearDown();
try {
$plugins = Piwik_PluginsManager::getInstance()->getLoadedPlugins();
foreach ($plugins as $plugin) {
$plugin->uninstall();
}
Piwik_PluginsManager::getInstance()->unloadPlugins();
} catch (Exception $e) {
}
Piwik::dropDatabase();
Piwik_DataTable_Manager::getInstance()->deleteAll();
Piwik_Option::getInstance()->clearCache();
Piwik_Site::clearCache();
Piwik_Common::deleteTrackerCache();
Piwik_Config::getInstance()->clear();
Piwik_TablePartitioning::$tablesAlreadyInstalled = null;
Zend_Registry::_unsetInstance();
}
示例4: tearDownAfterClass
public static function tearDownAfterClass()
{
try {
$plugins = Piwik_PluginsManager::getInstance()->getLoadedPlugins();
foreach ($plugins as $plugin) {
$plugin->uninstall();
}
Piwik_PluginsManager::getInstance()->unloadPlugins();
} catch (Exception $e) {
}
Piwik::dropDatabase();
Piwik_DataTable_Manager::getInstance()->deleteAll();
Piwik_Option::getInstance()->clearCache();
Piwik_Site::clearCache();
Piwik_Common::deleteTrackerCache();
Piwik_Config::getInstance()->clear();
Piwik_TablePartitioning::$tablesAlreadyInstalled = null;
Zend_Registry::_unsetInstance();
$_GET = $_REQUEST = array();
Piwik_Translate::getInstance()->unloadEnglishTranslation();
// re-enable tag cloud shuffling
Piwik_Visualization_Cloud::$debugDisableShuffle = true;
}