當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Fixture::loadAllPlugins方法代碼示例

本文整理匯總了PHP中Piwik\Tests\Framework\Fixture::loadAllPlugins方法的典型用法代碼示例。如果您正苦於以下問題:PHP Fixture::loadAllPlugins方法的具體用法?PHP Fixture::loadAllPlugins怎麽用?PHP Fixture::loadAllPlugins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Piwik\Tests\Framework\Fixture的用法示例。


在下文中一共展示了Fixture::loadAllPlugins方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getApiForTesting

 public function getApiForTesting()
 {
     // we will test all segments from all plugins
     Fixture::loadAllPlugins();
     $apiToCall = array('VisitsSummary.get', 'CustomVariables.getCustomVariables');
     return array(array($apiToCall, array('idSite' => 'all', 'date' => self::$fixture->dateTime, 'periods' => array('day', 'week'), 'setDateLastN' => true, 'segment' => $this->getSegmentToTest())));
 }
開發者ID:TensorWrenchOSS,項目名稱:piwik,代碼行數:7,代碼來源:TwoVisitsWithCustomVariablesSegmentMatchNONETest.php

示例2: setUp

 /**
  * Setup the database and create the base tables for all tests
  */
 public function setUp()
 {
     parent::setUp();
     static::$fixture->extraDefinitions = array_merge(static::provideContainerConfigBeforeClass(), $this->provideContainerConfig());
     static::$fixture->createEnvironmentInstance();
     Db::createDatabaseObject();
     Fixture::loadAllPlugins(new TestingEnvironmentVariables(), get_class($this), self::$fixture->extraPluginsToLoad);
     Access::getInstance()->setSuperUserAccess(true);
     if (!empty(self::$tableData)) {
         self::restoreDbTables(self::$tableData);
     }
     PiwikCache::getEagerCache()->flushAll();
     PiwikCache::getTransientCache()->flushAll();
     MenuAbstract::clearMenus();
 }
開發者ID:hichnik,項目名稱:piwik,代碼行數:18,代碼來源:IntegrationTestCase.php

示例3: getApiForTesting

 public function getApiForTesting()
 {
     // we will test all segments from all plugins
     Fixture::loadAllPlugins();
     $idSite = self::$fixture->idSite;
     $apiForTesting = array();
     $segments = \Piwik\Plugins\API\API::getInstance()->getSegmentsMetadata(self::$fixture->idSite);
     foreach ($segments as $segment) {
         $apiForTesting[] = $this->getApiForTestingForSegment($idSite, $segment['segment']);
     }
     if (self::isMysqli() || self::isTravisCI()) {
         // Skip the test on Mysqli as it fails due to rounding Float errors on latitude/longitude
         // then the test started failing after bc19503 and I cannot understand why
         echo "Skipped test \n";
     } else {
         $apiForTesting[] = array('Live.getLastVisitsDetails', array('idSite' => $idSite, 'date' => '1998-07-12,today', 'period' => 'range', 'otherRequestParameters' => array('filter_limit' => 1000)));
     }
     return $apiForTesting;
 }
開發者ID:ahdinosaur,項目名稱:analytics.dinosaur.is,代碼行數:19,代碼來源:AutoSuggestAPITest.php


注:本文中的Piwik\Tests\Framework\Fixture::loadAllPlugins方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。