Exemplo n.º 1
0
 public function testHeaders()
 {
     $container = new Container('foo');
     $container->setHeaders(['foo' => 'bar']);
     $container->getMetadata()->set('bar', 'baz');
     $this->assertEquals('bar', $container->getHeader('foo'));
     $this->assertEquals(['foo' => ['bar'], 'X-Container-Meta-Bar' => 'baz'], $container->getHeaders());
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function updateContainer(Container $container)
 {
     $this->logger->info(sprintf('Updating container "%s"', $container->getName()));
     // make readable for public
     if ($container->isPublic()) {
         $container->getMetadata()->set('Read', '.r:*');
     }
     $response = $this->post($container->getName(), null, $container->getHeaders());
     return $this->assertResponse($response, [204 => true]);
 }