当前位置: 首页>>代码示例>>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;未经允许,请勿转载。