/** * delete * * @param boolean $wait * * @return \Guzzle\Service\Resource\Model */ public function delete($wait = false) { $response = $this->client->deleteBucket(['Bucket' => $this->name]); if ($wait) { $this->client->waitUntilBucketNotExists(['Bucket' => $this->name]); } return $response; }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); try { $clear = new \Aws\S3\Model\ClearBucket(self::$client, self::$test_upload_bucket); $clear->clear(); self::$client->deleteBucket(array('Bucket' => self::$test_upload_bucket)); self::$client->waitUntilBucketNotExists(array('Bucket' => self::$test_upload_bucket)); } catch (\Exception $exception) { } }