コード例 #1
0
 public function testHeaderWithPrefixedKey()
 {
     $container = new Container('foo');
     $container->setHeaders(['foo' => 'bar', 'X-Container-Meta-Bar' => 'baz']);
     $this->assertEquals(['foo' => ['bar'], 'X-Container-Meta-Bar' => 'baz'], $container->getHeaders());
 }
コード例 #2
0
 public function testCreatePublicContainer()
 {
     $name = 'foo';
     $headers = ['foo' => ['bar']];
     $this->mockClientRequest('put', $name, array_merge($headers, ['X-Container-Meta-Read' => '.r:*']), null, new Response(201));
     $container = new Container($name);
     $container->setPublic();
     $container->setHeaders($headers);
     $this->assertTrue($this->driver->createContainer($container));
 }