/**
  * @covers WindowsAzure\Common\Internal\Filters\AuthenticationFilter::handleResponse
  */
 public function testHandleResponse()
 {
     // Setup
     $channel = new HttpClient();
     $url = new \WindowsAzure\Common\Internal\Http\Url('http://microsoft.com');
     $channel->setUrl($url);
     $response = null;
     $scheme = new SharedKeyAuthScheme('acount', 'key');
     $filter = new AuthenticationFilter($scheme);
     // Test
     $response = $filter->handleResponse($channel, $response);
     // Assert
     $this->assertNull($response);
 }
 /**
  * @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);
 }
 /**
  * @covers WindowsAzure\Common\Internal\Http\HttpClient::__clone
  */
 public function test__clone()
 {
     // Setup
     $channel = new HttpClient();
     $channel->setHeader('myheader', 'headervalue');
     $channel->setUrl(new Url('http://www.example.com'));
     // Test
     $actual = clone $channel;
     $channel->setUrl(new Url('http://www.microsoft.com'));
     $channel->setHeader('headerx', 'valuex');
     // Assert
     $this->assertNotEquals($channel->getHeaders(), $actual->getHeaders());
     $this->assertNotEquals($channel->getUrl()->getUrl(), $actual->getUrl()->getUrl());
 }
 /**
  * @covers WindowsAzure\Common\Internal\Filters\SharedKeyFilter::handleResponse
  */
 public function testHandleResponse()
 {
     // Setup
     $channel = new HttpClient();
     $url = new \WindowsAzure\Common\Internal\Http\Url('http://microsoft.com');
     $channel->setUrl($url);
     $response = null;
     $filter = new SharedKeyFilter('acount', 'key', Resources::QUEUE_TYPE_NAME);
     // Test
     $response = $filter->handleResponse($channel, $response);
     // Assert
     $this->assertNull($response);
 }