当前位置: 首页>>代码示例>>PHP>>正文


PHP Fixture::createWebsite方法代码示例

本文整理汇总了PHP中Piwik\Tests\Framework\Fixture::createWebsite方法的典型用法代码示例。如果您正苦于以下问题:PHP Fixture::createWebsite方法的具体用法?PHP Fixture::createWebsite怎么用?PHP Fixture::createWebsite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik\Tests\Framework\Fixture的用法示例。


在下文中一共展示了Fixture::createWebsite方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     FakeAccess::$superUser = true;
     $idSite = Fixture::createWebsite('2014-01-01 00:00:00');
     $this->builder = $this->makeBuilder(array('method' => 'MultiSites_getAll', 'idSite' => $idSite));
 }
开发者ID:hongquan,项目名称:piwik,代码行数:7,代码来源:RssRendererTest.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     Fixture::createWebsite('2014-01-01 00:00:00');
     $this->tracker = new TestTracker();
     $this->request = $this->buildRequest(array('idsite' => 1));
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:7,代码来源:TrackerTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     // setup the access layer
     FakeAccess::$superUser = true;
     Fixture::createWebsite('2015-01-01 00:00:00');
 }
开发者ID:mgou-net,项目名称:piwik,代码行数:7,代码来源:ChunksTest.php

示例4: setUp

 public function setUp()
 {
     // add one thousand sites
     $allIdSites = array();
     for ($i = 0; $i < 1000; ++$i) {
         $allIdSites[] = Fixture::createWebsite($this->date, $ecommerce = 1, $siteName = "Site #{$i}");
     }
     $urls = array();
     for ($i = 0; $i != 3; ++$i) {
         $url = "http://whatever.com/" . ($i - 1) . "/" . ($i + 1);
         $title = "page view " . ($i - 1) . " / " . ($i + 1);
         $urls[$url] = $title;
     }
     $visitTimes = array();
     $date = Date::factory($this->date);
     for ($i = 0; $i != 4; ++$i) {
         $visitTimes[] = $date->addHour($i)->getDatetime();
     }
     // add 12000 visits (3 visitors with 4 visits each for each site) w/ 3 pageviews each on one day
     foreach ($visitTimes as $visitTime) {
         foreach ($allIdSites as $idSite) {
             for ($visitor = 0; $visitor != 3; ++$visitor) {
                 $t = BenchmarkTestCase::getLocalTracker($idSite);
                 $ip = "157.5.6." . ($visitor + 1);
                 $t->setIp($ip);
                 $t->setNewVisitorId();
                 $t->setForceVisitDateTime($visitTime);
                 foreach ($urls as $url => $title) {
                     $t->setUrl($url);
                     $t->doTrackPageView($title);
                 }
             }
         }
     }
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:35,代码来源:ThousandSitesTwelveVisitsEachOneDay.php

示例5: setUpBeforeClass

 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     Fixture::createWebsite('2012-01-01 00:00:00');
     Fixture::createWebsite('2012-01-01 00:00:00');
     Fixture::createWebsite('2012-01-01 00:00:00');
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:7,代码来源:InvalidateReportDataTest.php

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     $this->idSite = Fixture::createWebsite('2012-01-01 00:00:00');
     $this->formatter = new SegmentFormatter(new SegmentList());
     Translate::loadAllTranslations();
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:7,代码来源:SegmentFormatterTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     if (!Fixture::siteCreated($this->idSite)) {
         Fixture::createWebsite('2014-01-01 00:00:00');
     }
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:7,代码来源:TrackerLoggingTest.php

示例8: setUp

 public function setUp()
 {
     // add one site
     Fixture::createWebsite($this->date, $ecommerce = 1, $siteName = "Site #0", $siteUrl = "http://whatever.com/");
     // add two goals
     $goals = API::getInstance();
     $goals->addGoal($this->idSite, 'all', 'url', 'http', 'contains', false, 5);
     $goals->addGoal($this->idSite, 'all', 'url', 'thing2', 'contains');
     $start = Date::factory($this->date);
     $dates = array();
     for ($day = 0; $day != 31; ++$day) {
         $dates[] = $start->addDay($day);
     }
     $t = BenchmarkTestCase::getLocalTracker($this->idSite);
     $actionNum = 0;
     foreach ($dates as $date) {
         for ($visitNum = 0; $visitNum != 1000; ++$visitNum) {
             if ($visitNum % 2 == 0) {
                 $url = "http://whatever.com/{$actionNum}/0/1/2/3/4/5/6/7/8/9";
                 $referrerUrl = "http://google.com/?q={$actionNum}";
             } else {
                 $url = "http://whatever.com/thing2/{$actionNum}/0/1/2/3/4/5/6/7/8/9";
                 $referrerUrl = "http://";
             }
             $title = "A page title / {$actionNum} / 0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 /9";
             $t->setNewVisitorId();
             $t->setForceVisitDateTime($date);
             $t->setUrl($url);
             $t->setUrlReferrer($referrerUrl);
             Fixture::checkResponse($t->doTrackPageView($title));
             ++$actionNum;
         }
     }
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:34,代码来源:OneSiteThousandsOfDistinctUrlsOverMonth.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $this->tracker = new TestIntegrationTracker();
     Fixture::createWebsite('2014-01-01 00:00:00');
     Fixture::createWebsite('2014-01-01 00:00:00');
     $this->injectRawDataToBulk($this->getDummyRequest());
 }
开发者ID:cemo,项目名称:piwik,代码行数:8,代码来源:TrackerTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     for ($i = 1; $i <= $this->numSitesToCreate; $i++) {
         Fixture::createWebsite('2012-12-12 00:00:00', $ecommerce = 0, 'Site ' . $i);
     }
     $this->dashboard = $this->getMockBuilder('Piwik\\Plugins\\MultiSites\\Dashboard')->setMethods(null)->disableOriginalConstructor()->getMock();
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:8,代码来源:DashboardTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     Fixture::createWebsite('2014-01-01 00:00:00');
     Fixture::createWebsite('2014-01-01 00:00:00');
     Cache::deleteTrackerCache();
     $_SERVER['HTTP_USER_AGENT'] = '';
 }
开发者ID:mgou-net,项目名称:piwik,代码行数:8,代码来源:SettingsTest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     if (!Fixture::siteCreated(1)) {
         Fixture::createWebsite('2015-01-01 00:00:00');
     }
     $this->channels = new Plugin\ReleaseChannels(StaticContainer::get('Piwik\\Plugin\\Manager'));
 }
开发者ID:JoeHorn,项目名称:piwik,代码行数:8,代码来源:ReleaseChannelsTest.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     if (!Fixture::siteCreated(1)) {
         Fixture::createWebsite('2014-01-01 00:00:00');
     }
     $this->index = new Index();
 }
开发者ID:ep123,项目名称:plugin-CustomDimensions,代码行数:8,代码来源:IndexTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     // setup the access layer
     FakeAccess::$superUser = true;
     $this->manager = new SitesManager();
     $this->siteId = Fixture::createWebsite('2014-03-03 00:00:00');
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:8,代码来源:SitesManagerTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     $this->plugin = new VisitsSummary();
     $this->setSuperUser();
     Fixture::createSuperUser();
     Fixture::createWebsite('2014-01-01 00:00:00');
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:8,代码来源:VisitsSummaryTest.php


注:本文中的Piwik\Tests\Framework\Fixture::createWebsite方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。