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


PHP Fixture::siteCreated方法代码示例

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


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

示例1: 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

示例2: 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

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     if (!Fixture::siteCreated($this->idSite)) {
         Fixture::createWebsite('2014-01-01 00:00:00');
     }
     $this->settings = new UserSettings(new SystemSettings());
 }
开发者ID:piwik,项目名称:plugin-AnonymousPiwikUsageMeasurement,代码行数:8,代码来源:UserSettingsTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     if (!Fixture::siteCreated($this->idSite)) {
         Fixture::createWebsite('2010-00-00 00:00:00');
     }
     $this->dao = new RawLogDao();
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:8,代码来源:RawLogDaoTest.php

示例5: 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

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     if (!Fixture::siteCreated($this->idSite)) {
         Fixture::createWebsite('2015-01-01 00:00:00');
     }
     $this->storage = $this->createStorage();
     $this->setting = $this->createSetting('test');
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:9,代码来源:StorageTest.php

示例7: setUp

 public function setUp()
 {
     parent::setUp();
     $idSite = 1;
     $dateTime = '2014-01-01 00:00:01';
     if (!Fixture::siteCreated($idSite)) {
         Fixture::createWebsite($dateTime);
     }
     $this->tracker = Fixture::getTracker($idSite, $dateTime, $defaultInit = true);
 }
开发者ID:mgou-net,项目名称:piwik,代码行数:10,代码来源:TrackerResponseTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->api = API::getInstance();
     Fixture::createSuperUser();
     if (!Fixture::siteCreated(1)) {
         Fixture::createWebsite('2012-01-01 00:00:00');
     }
     $this->setSuperUser();
 }
开发者ID:ep123,项目名称:plugin-CustomDimensions,代码行数:10,代码来源:ApiTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     Plugin\Manager::getInstance()->activatePlugin('MobileAppMeasurable');
     if (!Fixture::siteCreated($this->idSite)) {
         $type = MobileAppType::ID;
         Fixture::createWebsite('2015-01-01 00:00:00', $ecommerce = 0, $siteName = false, $siteUrl = false, $siteSearch = 1, $searchKeywordParameters = null, $searchCategoryParameters = null, $timezone = null, $type);
     }
     $this->measurable = new Measurable($this->idSite);
 }
开发者ID:mgou-net,项目名称:piwik,代码行数:10,代码来源:MeasurableTest.php

示例10: setUp

 public function setUp()
 {
     parent::setUp();
     foreach (array(1, 2) as $idSite) {
         if (!Fixture::siteCreated($idSite)) {
             Fixture::createWebsite('2012-01-01 00:00:00');
         }
     }
     $this->plugin = new CustomDimensions();
 }
开发者ID:ep123,项目名称:plugin-CustomDimensions,代码行数:10,代码来源:CustomDimensionsTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     $this->api = API::getInstance();
     Fixture::createSuperUser(true);
     if (!Fixture::siteCreated(1)) {
         Fixture::createWebsite('2012-01-01 00:00:00');
     }
     $this->makeSureTestRunsInContextOfAnonymousUser();
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:10,代码来源:APITest.php

示例12: setUp

 public function setUp()
 {
     parent::setUp();
     $idSite = 1;
     if (!Fixture::siteCreated($idSite)) {
         Fixture::createWebsite('2014-01-01 00:00:00');
     }
     $site = new Site($idSite);
     $date = Date::factory('2012-01-01');
     $period = Period\Factory::build('month', $date);
     $segment = new Segment('', array($site->getId()));
     $params = new Parameters($site, $period, $segment);
     $this->logAggregator = new LogAggregator($params);
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:14,代码来源:LogAggregatorTest.php

示例13: setUp

 public function setUp()
 {
     parent::setUp();
     if (!Fixture::siteCreated(1)) {
         Fixture::createWebsite('2012-01-01 00:00:00');
     }
     if (!Fixture::siteCreated(2)) {
         Fixture::createWebsite('2012-01-01 00:00:00');
     }
     Cache::clearCacheGeneral();
     Cache::deleteCacheWebsiteAttributes($idSite = 1);
     Cache::deleteCacheWebsiteAttributes($idSite = 2);
     $this->processor = new Processor();
 }
开发者ID:piwik,项目名称:plugin-CustomDimensions,代码行数:14,代码来源:CustomDimensionsRequestProcessorTest.php

示例14: test_getServerVisitCustomVariables_shouldReturnSystemReport

 public function test_getServerVisitCustomVariables_shouldReturnSystemReport()
 {
     FakeAccess::clearAccess($superUser = true);
     for ($i = 1; $i < 15; $i++) {
         if (!Fixture::siteCreated($i)) {
             Fixture::createWebsite('2014-01-01 00:00:00');
         }
     }
     for ($i = 1; $i < 9; $i++) {
         UsersApi::getInstance()->addUser($login = 'test' . $i, 'password0815', "lorem{$i}@piwik.org");
     }
     for ($i = 1; $i < 5; $i++) {
         SegmentApi::getInstance()->add('Segment' . $i, 'pageUrl%3D@inde');
     }
     $customVars = array(array('id' => 1, 'name' => 'Piwik Version', 'value' => '2.14.3'), array('id' => 2, 'name' => 'PHP Version', 'value' => '5.5.27'), array('id' => 3, 'name' => 'Num Users', 'value' => 8), array('id' => 4, 'name' => 'Num Websites', 'value' => 14), array('id' => 5, 'name' => 'Num Segments', 'value' => 4), array('id' => 6, 'name' => 'MySQL Version', 'value' => Db::get()->getServerVersion()));
     $this->assertSame($customVars, $this->customVars->getServerVisitCustomVariables());
 }
开发者ID:piwik,项目名称:plugin-AnonymousPiwikUsageMeasurement,代码行数:17,代码来源:CustomVariablesTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     if (!IntegrationTestCase::isRedisAvailable()) {
         $this->markTestSkipped('Redis extension is not installed, skipping test');
     }
     if (self::isTravisCI() && self::isPhpVersion53()) {
         $this->markTestSkipped('Redis seems to be not enabled in nginx on Travis + PHP 5.3.3');
     }
     self::$fixture->performSetup();
     $idSite = 1;
     $dateTime = '2014-01-01 00:00:01';
     if (!Fixture::siteCreated($idSite)) {
         Fixture::createWebsite($dateTime);
     }
     $queuedTracking = new QueuedTracking();
     $this->tracker = Fixture::getTracker($idSite, $dateTime, $defaultInit = true);
     $this->enableQueue();
 }
开发者ID:ruchitrami,项目名称:plugin-QueuedTracking,代码行数:19,代码来源:TrackerTest.php


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