當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Fixture::getTrackerUrl方法代碼示例

本文整理匯總了PHP中Piwik\Tests\Framework\Fixture::getTrackerUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Fixture::getTrackerUrl方法的具體用法?PHP Fixture::getTrackerUrl怎麽用?PHP Fixture::getTrackerUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Piwik\Tests\Framework\Fixture的用法示例。


在下文中一共展示了Fixture::getTrackerUrl方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getLocalTracker

 /**
  * Creates a tracking object that invokes the tracker directly (w/o going through HTTP).
  */
 public static function getLocalTracker($idSite)
 {
     require_once PIWIK_INCLUDE_PATH . '/tests/LocalTracker.php';
     $t = new \Piwik_LocalTracker($idSite, Fixture::getTrackerUrl());
     $t->setUserAgent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729)");
     $t->setBrowserLanguage('fr');
     $t->setLocalTime('12:34:06');
     $t->setResolution(1024, 768);
     $t->setBrowserHasCookies(true);
     $t->setPlugins($flash = true, $java = true, $director = false);
     $t->setTokenAuth(Fixture::getTokenAuth());
     return $t;
 }
開發者ID:FluentDevelopment,項目名稱:piwik,代碼行數:16,代碼來源:BenchmarkTestCase.php

示例2: test_response_ShouldReturnPiwikMessageWithHttp400_InCaseOfInvalidRequestOrIfNothingIsTracked

 public function test_response_ShouldReturnPiwikMessageWithHttp400_InCaseOfInvalidRequestOrIfNothingIsTracked()
 {
     $url = Fixture::getTrackerUrl();
     $this->assertResponseCode(400, $url . '?rec=1');
     $expected = "<a href='/'>Piwik</a> is a free/libre web <a href='http://piwik.org'>analytics</a> that lets you keep control of your data.";
     $this->assertHttpResponseText($expected, $url);
 }
開發者ID:mgou-net,項目名稱:piwik,代碼行數:7,代碼來源:TrackerResponseTest.php


注:本文中的Piwik\Tests\Framework\Fixture::getTrackerUrl方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。