function _testS3Bucket() { $AmazonS3 = new AmazonS3("", ""); $res = $AmazonS3->ListBuckets(); $this->assertTrue(is_array($res->Bucket), "ListBuckets returned array"); $res = $AmazonS3->CreateBucket("MySQLDumps"); $this->assertTrue($res, "Bucket successfull created"); $res = $AmazonS3->CreateObject("fonts/test.ttf", "offload-public", "/tmp/PhotoEditService.wsdl", "plain/text"); $this->assertTrue($res, "Object successfull created"); $res = $AmazonS3->DownloadObject("fonts/test.ttf", "offload-public"); $this->assertTrue($res, "Object successfull downloaded"); $res = $AmazonS3->DeleteObject("fonts/test.ttf", "offload-public"); $this->assertTrue($res, "Object successfull removed"); }
function _testS3Bucket() { $AmazonS3 = new AmazonS3("0EJNVE9QFYY3TD554T02", "VOtWnbI2PmsqKOqDNVVgfLVsEnGD/6miiYDY552S"); $res = $AmazonS3->ListBuckets(); $this->assertTrue(is_array($res->Bucket), "ListBuckets returned array"); $res = $AmazonS3->CreateBucket("MySQLDumps"); $this->assertTrue($res, "Bucket successfull created"); $res = $AmazonS3->CreateObject("fonts/test.ttf", "offload-public", "/tmp/PhotoEditService.wsdl", "plain/text"); $this->assertTrue($res, "Object successfull created"); $res = $AmazonS3->DownloadObject("fonts/test.ttf", "offload-public"); $this->assertTrue($res, "Object successfull downloaded"); $res = $AmazonS3->DeleteObject("fonts/test.ttf", "offload-public"); $this->assertTrue($res, "Object successfull removed"); }