/** * @inheritdoc */ public function copyObject(SwiftObject $object, Container $toContainer, $name) { $destination = sprintf('/%s/%s', $toContainer->getName(), $name); $headers = ['Destination' => $destination]; $this->logger->info(sprintf('Copying "%s" => "%s"', $object->getPath(), $destination)); $response = $this->copy($object->getPath(), null, $headers); return $this->assertResponse($response, [201 => function () use($toContainer, $name) { return $this->getObject($toContainer, $name); }]); }
public function testDeleteNotFoundObject() { $container = new Container('foo'); $object = new SwiftObject($container, 'bar'); $this->mockClientRequest('delete', $object->getPath(), [], null, new Response(404)); $this->assertTrue($this->driver->deleteObject($object)); }