예제 #1
0
 public function testPut()
 {
     $key = 'tmp/testPut' . getTid();
     $err = RSUtils::Qiniu_RS_Delete($this->client, $this->bucket, $key);
     list($ret, $err) = RSUtils::Qiniu_RS_Put($this->client, $this->bucket, $key, 'hello world!', null);
     $this->assertNull($err);
     $this->assertArrayHasKey('hash', $ret);
     var_dump($ret);
     list($ret, $err) = RSUtils::Qiniu_RS_Stat($this->client, $this->bucket, $key);
     $this->assertNull($err);
     var_dump($ret);
     $err = RSUtils::Qiniu_RS_Delete($this->client, $this->bucket, $key);
     $this->assertNull($err);
 }