示例#1
0
 /**
  * deleteFolder
  * 删除文件夹 注意:文件夹不为空时会删除失败
  *
  * @param string $bucket
  * @param string $folder  远程文件夹名
  * @throws Exceptions\RequestException 请求失败时
  * @return object
  */
 public function deleteFolder($bucket, $folder)
 {
     $url = $this->buildUrl('file', $bucket, $folder, true);
     $sign = $this->auth->generateOneTimeSign($folder, $bucket);
     return $this->restClient->request('POST', $url, $sign, ['json' => ['op' => 'delete']]);
 }
 public function testGetHttpClient()
 {
     $domain = $this->faker->domainName;
     $restClient = new RestClient(['domain' => $domain]);
     $httpClient = $restClient->getHttpClient();
     $this->assertInstanceOf(HttpClient::class, $httpClient);
 }