/**
  * @covers WindowsAzure\Blob\BlobRestProxy::createContainer
  * @covers WindowsAzure\Blob\BlobRestProxy::deleteContainer
  * @covers WindowsAzure\Blob\BlobRestProxy::listContainers
  */
 public function setUp()
 {
     parent::setUp();
     $accountName = $this->config->getProperty(BlobSettings::URI);
     $firstSlash = strpos($accountName, '/');
     $accountName = substr($accountName, $firstSlash + 2);
     $firstDot = strpos($accountName, '.');
     $accountName = substr($accountName, 0, $firstDot);
     BlobServiceFunctionalTestData::setupData($accountName);
     $hasRoot = false;
     foreach ($this->restProxy->listContainers()->getContainers() as $container) {
         if ($container->getName() == '$root') {
             $hasRoot = true;
             $this->safeDeleteContainerContents('$root');
         } else {
             $this->safeDeleteContainer($container->getName());
         }
     }
     foreach (BlobServiceFunctionalTestData::$TEST_CONTAINER_NAMES as $name) {
         $this->safeCreateContainer($name);
     }
     if (!$hasRoot) {
         $this->safeCreateContainer('$root');
     }
 }
 public static function tearDownAfterClass()
 {
     if (self::$isOneTimeSetup) {
         $integrationTestBase = new IntegrationTestBase();
         $integrationTestBase->setUp();
         if ($integrationTestBase->isEmulated()) {
             $serviceProperties = BlobServiceFunctionalTestData::getDefaultServiceProperties();
             $integrationTestBase->restProxy->setServiceProperties($serviceProperties);
         }
         self::$isOneTimeSetup = false;
     }
     parent::tearDownAfterClass();
 }
 /**
  * @covers WindowsAzure\Blob\BlobRestProxy::listContainers
  */
 public function testListContainersWithOneResult()
 {
     // Setup
     $containerName = 'listcontainerswithoneresult' . $this->createSuffix();
     parent::createContainer($containerName);
     // Test
     $result = $this->restProxy->listContainers();
     $containers = $result->getContainers();
     // Assert
     $this->assertEquals(1, count($containers));
 }
 /**
  * @covers WindowsAzure\Blob\BlobRestProxy::withFilter
  */
 public function __construct()
 {
     parent::__construct();
     $fiddlerFilter = new FiddlerFilter();
     $this->restProxy = $this->restProxy->withFilter($fiddlerFilter);
 }