public function __construct()
 {
     $config = new Configuration();
     $queueUri = TestResources::accountName() . '.queue.core.windows.net';
     $config->setProperty(QueueSettings::ACCOUNT_KEY, TestResources::accountKey());
     $config->setProperty(QueueSettings::ACCOUNT_NAME, TestResources::accountName());
     $config->setProperty(QueueSettings::URI, $queueUri);
     $queueRestProxy = QueueService::create($config);
     parent::__construct($config, $queueRestProxy);
     $this->_createdQueues = array();
 }
 /**
  * @covers WindowsAzure\Queue\QueueService::create
  */
 public function testCreateWithConfig()
 {
     // Setup
     $uri = 'http://' . TestResources::accountName() . '.queue.core.windows.net';
     $config = new Configuration();
     $config->setProperty(QueueSettings::ACCOUNT_KEY, TestResources::accountKey());
     $config->setProperty(QueueSettings::ACCOUNT_NAME, TestResources::accountName());
     $config->setProperty(QueueSettings::URI, $uri);
     // Test
     $queueRestProxy = QueueService::create($config);
     // Assert
     $this->assertInstanceOf('WindowsAzure\\Queue\\Internal\\IQueue', $queueRestProxy);
 }
 /**
  * Constructs CloudStorageService using the provided parameters.
  * 
  * @param string $name      The storage service name.
  * @param string $key       The storage service access key.
  * @param array  $endpoints The storage service endpoints.
  * @throws \InvalidArgumentException 
  */
 public function __construct($name, $key, $endpoints)
 {
     $queueUri = null;
     $blobUri = null;
     $tableUri = null;
     foreach ($endpoints as $value) {
         if (substr_count($value, 'queue.core')) {
             $queueUri = $value;
         } else {
             if (substr_count($value, 'table.core')) {
                 $tableUri = $value;
             } else {
                 if (substr_count($value, 'blob.core')) {
                     $blobUri = $value;
                 } else {
                     throw new \InvalidArgumentException(ErrorMessages::INVALID_ENDPOINT);
                 }
             }
         }
     }
     $config = new Configuration();
     $config->setProperty(TableSettings::ACCOUNT_NAME, $name);
     $config->setProperty(TableSettings::ACCOUNT_KEY, $key);
     $config->setProperty(TableSettings::URI, $tableUri);
     $config->setProperty(BlobSettings::ACCOUNT_NAME, $name);
     $config->setProperty(BlobSettings::ACCOUNT_KEY, $key);
     $config->setProperty(BlobSettings::URI, $tableUri);
     $config->setProperty(QueueSettings::ACCOUNT_NAME, $name);
     $config->setProperty(QueueSettings::ACCOUNT_KEY, $key);
     $config->setProperty(QueueSettings::URI, $tableUri);
     $this->_tableProxy = TableService::create($config);
     $this->_blobProxy = BlobService::create($config);
     $this->_queueProxy = QueueService::create($config);
 }