當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。