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