/**
  * @covers WindowsAzure\Blob\Models\ListContainersOptions::getMarker
  */
 public function testGetMarker()
 {
     // Setup
     $options = new ListContainersOptions();
     $expected = 'mymarker';
     $options->setMarker($expected);
     // Test
     $actual = $options->getMarker();
     // Assert
     $this->assertEquals($expected, $actual);
 }
Example #2
0
 /**
  * Lists all of the containers in the given storage account.
  * 
  * @param Models\ListContainersOptions $options The optional parameters.
  * 
  * @return WindowsAzure\Blob\Models\ListContainersResult
  * 
  * @see http://msdn.microsoft.com/en-us/library/windowsazure/dd179352.aspx
  */
 public function listContainers($options = null)
 {
     $method = Resources::HTTP_GET;
     $headers = array();
     $queryParams = array();
     $postParams = array();
     $path = Resources::EMPTY_STRING;
     $statusCode = Resources::STATUS_OK;
     if (is_null($options)) {
         $options = new ListContainersOptions();
     }
     $this->addOptionalQueryParam($queryParams, Resources::QP_TIMEOUT, $options->getTimeout());
     $this->addOptionalQueryParam($queryParams, Resources::QP_COMP, 'list');
     $this->addOptionalQueryParam($queryParams, Resources::QP_PREFIX, $options->getPrefix());
     $this->addOptionalQueryParam($queryParams, Resources::QP_MARKER, $options->getMarker());
     $this->addOptionalQueryParam($queryParams, Resources::QP_MAX_RESULTS, $options->getMaxResults());
     $isInclude = $options->getIncludeMetadata();
     $isInclude = $isInclude ? 'metadata' : null;
     $this->addOptionalQueryParam($queryParams, Resources::QP_INCLUDE, $isInclude);
     $response = $this->send($method, $headers, $queryParams, $postParams, $path, $statusCode);
     $parsed = $this->dataSerializer->unserialize($response->getBody());
     return ListContainersResult::create($parsed);
 }