Exemple #1
0
 /**
  * Test signing for production with query string
  */
 public function testSignForProductionWithQueryString()
 {
     $credentials = new Zend_Service_WindowsAzure_Credentials_SharedKey('testing', 'abcdefg');
     $signedHeaders = $credentials->signRequestHeaders('GET', '/', '?test=true', array("x-ms-date" => "Wed, 29 Apr 2009 13:12:47 GMT"), false);
     $this->assertType('array', $signedHeaders);
     $this->assertEquals(2, count($signedHeaders));
     $this->assertEquals("SharedKey testing:TEYBENKs+6laykL+zCxlIbUT9v019rtMWECYwgP/OuU=", $signedHeaders["Authorization"]);
 }
 /**
  * Test signing for production with query string
  */
 public function testSignForProductionWithQueryString()
 {
     $credentials = new Zend_Service_WindowsAzure_Credentials_SharedKey('testing', 'abcdefg');
     $signedHeaders = $credentials->signRequestHeaders('GET', '/', '?test=true', array("x-ms-date" => "Wed, 29 Apr 2009 13:12:47 GMT"), false);
     $this->assertType('array', $signedHeaders);
     $this->assertEquals(2, count($signedHeaders));
     $this->assertEquals("SharedKey testing:vlfVjEbBaRVTv35e924cR4B/Z5zCaSYjbtMz9/k3UCY=", $signedHeaders["Authorization"]);
 }