本文整理汇总了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;
}
示例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);
}