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


PHP TestResources::getServiceBusConnectionString方法代碼示例

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


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

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     $serviceBusWrapper = $this->builder->createServiceBusService(TestResources::getServiceBusConnectionString());
     $this->_createdTopics = array();
     $this->_createdSubscriptions = array();
     $this->_createdRules = array();
     $this->_createdQueues = array();
     parent::setProxy($serviceBusWrapper);
 }
開發者ID:bitmovin,項目名稱:azure-sdk-for-php,代碼行數:10,代碼來源:ServiceBusRestProxyTestBase.php

示例2: testWrapAccessToken

 /**
  * @covers WindowsAzure\ServiceBus\Internal\WrapRestProxy::__construct
  * @covers WindowsAzure\ServiceBus\Internal\WrapRestProxy::wrapAccessToken
  */
 public function testWrapAccessToken()
 {
     $settings = ServiceBusSettings::createFromConnectionString(TestResources::getServiceBusConnectionString());
     $wrapUri = $settings->getWrapEndpointUri();
     $wrapUserName = $settings->getWrapName();
     $wrapPassword = $settings->getWrapPassword();
     $scope = str_replace('https', 'http', $settings->getServiceBusEndpointUri());
     $wrapAccessTokenResult = $this->_wrapRestProxy->wrapAccessToken($wrapUri, $wrapUserName, $wrapPassword, $scope);
     $this->assertNotNull($wrapAccessTokenResult);
     $this->assertNotNull($wrapAccessTokenResult->getAccessToken());
 }
開發者ID:bitmovin,項目名稱:azure-sdk-for-php,代碼行數:15,代碼來源:WrapRestProxyTest.php

示例3: testHandleResponse

 /**
  * @covers WindowsAzure\Common\Internal\Filters\WrapFilter::handleResponse
  */
 public function testHandleResponse()
 {
     // Setup
     $channel = new HttpClient();
     $url = new Url('http://microsoft.com');
     $channel->setUrl($url);
     $response = null;
     $settings = ServiceBusSettings::createFromConnectionString(TestResources::getServiceBusConnectionString());
     $wrapUri = $settings->getWrapEndpointUri();
     $wrapFilter = new WrapFilter($wrapUri, $settings->getWrapName(), $settings->getWrapPassword(), $this->_wrapRestProxy);
     // Test
     $response = $wrapFilter->handleResponse($channel, $response);
     // Assert
     $this->assertNull($response);
 }
開發者ID:jdruid,項目名稱:Microsoft-Azure-PHP-SDK-Storage,代碼行數:18,代碼來源:WrapFilterTest.php

示例4: testGetAccesTokenFailedWithInvalidPassword

 /**
  * @covers WindowsAzure\ServiceBus\Internal\WrapTokenManager::__construct
  * @covers WindowsAzure\ServiceBus\Internal\WrapTokenManager::getAccessToken
  */
 public function testGetAccesTokenFailedWithInvalidPassword()
 {
     $this->setExpectedException(get_class(new ServiceException('')));
     $settings = ServiceBusSettings::createFromConnectionString(TestResources::getServiceBusConnectionString());
     $wrapUri = $settings->getWrapEndpointUri();
     $wrapUserName = $settings->getWrapName();
     $wrapPassword = 'IAmNotACorrectPassword';
     $scope = $settings->getServiceBusEndpointUri();
     $wrapTokenManager = new WrapTokenManager($wrapUri, $wrapUserName, $wrapPassword, $this->_wrapRestProxy);
     // Test
     $wrapTokenManager->getAccessToken($scope);
 }
開發者ID:southworkscom,項目名稱:azure-sdk-for-php,代碼行數:16,代碼來源:WrapTokenManagerTest.php

示例5: testBuildForServiceBus

 /**
  * @covers WindowsAzure\Common\ServicesBuilder::createServiceBusService
  * @covers WindowsAzure\Common\ServicesBuilder::createWrapService
  * @covers WindowsAzure\Common\ServicesBuilder::httpClient
  * @covers WindowsAzure\Common\ServicesBuilder::serializer
  */
 public function testBuildForServiceBus()
 {
     // Setup
     $builder = new ServicesBuilder();
     // Test
     $serviceBusRestProxy = $builder->createServiceBusService(TestResources::getServiceBusConnectionString());
     // Assert
     $this->assertInstanceOf('WindowsAzure\\ServiceBus\\Internal\\IServiceBus', $serviceBusRestProxy);
 }
開發者ID:bitmovin,項目名稱:azure-sdk-for-php,代碼行數:15,代碼來源:ServicesBuilderTest.php


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