本文整理汇总了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'];
}
示例2: setUp
public function setUp()
{
parent::setUp();
$this->plugin = new VisitsSummary();
$this->setSuperUser();
Fixture::createSuperUser();
Fixture::createWebsite('2014-01-01 00:00:00');
}
示例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');
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
示例8: getSuperUserToken
private function getSuperUserToken()
{
Fixture::createSuperUser(false);
return Fixture::getTokenAuth();
}