初始化仓库

This commit is contained in:
wangxiaowei
2025-04-22 14:09:52 +08:00
commit 8b100110bb
5155 changed files with 664201 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?php
namespace OSS\Tests;
use OSS\Core\OssException;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class OssClientBucketVersioningTest extends TestOssClientBase
{
public function testBucket()
{
try {
Common::waitMetaSync();
$status = $this->ossClient->getBucketVersioning($this->bucket);
$this->assertEquals(null, $status);
} catch (OssException $e) {
$this->assertTrue(false);
}
try {
$this->ossClient->putBucketVersioning($this->bucket, "Enabled");
Common::waitMetaSync();
$status = $this->ossClient->getBucketVersioning($this->bucket);
$this->assertEquals("Enabled", $status);
} catch (OssException $e) {
$this->assertTrue(false);
}
try {
$this->ossClient->putBucketVersioning($this->bucket, "Suspended");
Common::waitMetaSync();
$status = $this->ossClient->getBucketVersioning($this->bucket);
$this->assertEquals("Suspended", $status);
} catch (OssException $e) {
$this->assertTrue(false);
}
}
}