添加网站文件

This commit is contained in:
2025-12-22 13:59:40 +08:00
commit 117aaf83d1
19468 changed files with 2111999 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace OSS\Tests;
use OSS\Core\OssException;
require_once __DIR__ . DIRECTORY_SEPARATOR . 'TestOssClientBase.php';
class OssClientBucketWormTest extends TestOssClientBase
{
public function testBucket()
{
try {
$wormId = $this->ossClient->initiateBucketWorm($this->bucket, 30);
$config = $this->ossClient->getBucketWorm($this->bucket);
$this->assertEquals($wormId, $config->getWormId());
$this->assertEquals("InProgress", $config->getState());
$this->assertEquals(30, $config->getDay());
$this->ossClient->abortBucketWorm($this->bucket);
$wormId = $this->ossClient->initiateBucketWorm($this->bucket, 60);
$this->ossClient->completeBucketWorm($this->bucket, $wormId);
$config = $this->ossClient->getBucketWorm($this->bucket);
$this->ossClient->ExtendBucketWorm($this->bucket, $wormId, 120);
$config = $this->ossClient->getBucketWorm($this->bucket);
$this->assertEquals($wormId, $config->getWormId());
$this->assertEquals("Locked", $config->getState());
$this->assertEquals(120, $config->getDay());
} catch (OssException $e) {
$this->assertTrue(false);
}
}
}