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()); }
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)); }