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


PHP Fixture::createSuperUser方法代码示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     Fixture::createSuperUser();
     $manager = $this->createQueueManager();
     $this->manager = $manager['queue'];
     $this->lock = $manager['lock'];
 }
开发者ID:ruchitrami,项目名称:plugin-QueuedTracking,代码行数:8,代码来源:ManagerTest.php

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

示例3: setUp

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

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

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

示例6: setUp

 public function setUp()
 {
     parent::setUp();
     Fixture::createWebsite('2014-01-01 00:00:00');
     Fixture::createSuperUser();
     Tracker\Cache::deleteTrackerCache();
     $this->backend = $this->createRedisBackend();
     $this->queue = Queue\Factory::makeQueueManager($this->backend);
     $this->response = new Response();
     $this->handler = new Handler();
     $this->handler->setResponse($this->response);
     $this->tracker = new Tracker();
     $this->requestSet = new RequestSet();
 }
开发者ID:ruchitrami,项目名称:plugin-QueuedTracking,代码行数:14,代码来源:HandlerTest.php

示例7: test_authenticateSuperUserOrAdmin_ShouldAlwaysWorkForSuperUser

 public function test_authenticateSuperUserOrAdmin_ShouldAlwaysWorkForSuperUser()
 {
     Fixture::createSuperUser(false);
     $token = Fixture::getTokenAuth();
     $isAuthenticated = Request::authenticateSuperUserOrAdmin($token, 1);
     $this->assertTrue($isAuthenticated);
     $isAuthenticated = Request::authenticateSuperUserOrAdmin($token, 2);
     $this->assertTrue($isAuthenticated);
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:9,代码来源:RequestTest.php

示例8: getSuperUserToken

 private function getSuperUserToken()
 {
     Fixture::createSuperUser(false);
     return Fixture::getTokenAuth();
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:5,代码来源:RequestsTest.php


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