本文整理汇总了PHP中Piwik\Tests\Framework\Fixture::getTestRootUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Fixture::getTestRootUrl方法的具体用法?PHP Fixture::getTestRootUrl怎么用?PHP Fixture::getTestRootUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Tests\Framework\Fixture
的用法示例。
在下文中一共展示了Fixture::getTestRootUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getResponseFromHttpAPI
/**
* @param $requestUrl
* @return string
* @throws Exception
*/
protected function getResponseFromHttpAPI($requestUrl)
{
$queryString = Url::getQueryStringFromParameters($requestUrl);
$hostAndPath = Fixture::getTestRootUrl();
$url = $hostAndPath . '?' . $queryString;
$response = Http::sendHttpRequest($url, $timeout = 300);
return $response;
}
示例2: test_sendNotifications_shouldNotIncludeChangelogIfNotMajorVersionUpdate
public function test_sendNotifications_shouldNotIncludeChangelogIfNotMajorVersionUpdate()
{
$rootUrl = Fixture::getTestRootUrl();
$message = "ScheduledReports_EmailHello\n\nCoreUpdater_ThereIsNewVersionAvailableForUpdate\n\nCoreUpdater_YouCanUpgradeAutomaticallyOrDownloadPackage\n{$rootUrl}index.php?module=CoreUpdater&action=newVersionAvailable\n\nCoreUpdater_FeedbackRequest\nhttp://piwik.org/contact/";
$this->assertEmailForVersion('33.0.0-b1', $message);
}
示例3: test_sendNotificationIfUpdatesAvailable_ShouldSendCorrectText
public function test_sendNotificationIfUpdatesAvailable_ShouldSendCorrectText()
{
$subject = 'CoreUpdater_NotificationSubjectAvailablePluginUpdate';
$rootUrl = Fixture::getTestRootUrl();
$message = "ScheduledReports_EmailHello\n\nCoreUpdater_ThereIsNewPluginVersionAvailableForUpdate\n\n * MyTest1 33.0.0\n * MyTest2 32.0.0\n * MyTest3 31.0.0\n\nCoreUpdater_NotificationClickToUpdatePlugins\n{$rootUrl}index.php?module=CorePluginsAdmin&action=plugins\n\nInstallation_HappyAnalysing";
$mock = $this->getCommunicationMockHavingManyUpdates();
$mock->expects($this->once())->method('sendEmailNotification')->with($this->equalTo($subject), $this->equalTo($message));
$mock->sendNotificationIfUpdatesAvailable();
}