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


PHP Fixture::getTestRootUrl方法代碼示例

本文整理匯總了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;
 }
開發者ID:JoeHorn,項目名稱:piwik,代碼行數:13,代碼來源:SystemTestCase.php

示例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);
 }
開發者ID:dorelljames,項目名稱:piwik,代碼行數:6,代碼來源:UpdateCommunicationTest.php

示例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();
 }
開發者ID:dorelljames,項目名稱:piwik,代碼行數:9,代碼來源:UpdateCommunicationTest.php


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