/** * @depends testHeadBucket */ public function testPutBucketLocation() { $this->log(__METHOD__); $bucketName = self::getResourcePrefix() . '-s3eutest'; try { $this->client->headBucket(array('Bucket' => $bucketName)); } catch (\Exception $e) { $this->client->createBucket(array('Bucket' => $bucketName, 'LocationConstraint' => 'EU')); } $this->client->waitUntil('bucket_exists', array('Bucket' => $bucketName)); $result = $this->client->getBucketLocation(array('Bucket' => $bucketName)); $this->assertEquals('EU', $result['Location']); $this->client->deleteBucket(array('Bucket' => $bucketName)); }