update_upload_preset() public method

public update_upload_preset ( $name, $options = [] )
コード例 #1
0
ファイル: ApiTest.php プロジェクト: engineor/cloudinary_php
 function test31_update_upload_presets()
 {
     Curl::mockApi($this);
     $this->api->update_upload_preset("foobar", array("colors" => TRUE, "unsigned" => TRUE, "disallow_public_id" => TRUE));
     assertPut($this);
     assertUrl($this, "/upload_presets/foobar");
     assertParam($this, "colors", 1);
     assertParam($this, "unsigned", 1);
     assertParam($this, "disallow_public_id", 1);
 }
コード例 #2
0
 function test31_update_upload_presets()
 {
     // should allow getting a single upload_preset
     $result = $this->api->create_upload_preset(array("folder" => "folder"));
     $name = $result["name"];
     $preset = $this->api->upload_preset($name);
     $this->api->update_upload_preset($name, array_merge($preset["settings"], array("colors" => TRUE, "unsigned" => TRUE, "disallow_public_id" => TRUE)));
     $preset = $this->api->upload_preset($name);
     $this->assertEquals($preset["unsigned"], TRUE);
     $this->assertEquals($preset["settings"], array("folder" => "folder", "colors" => TRUE, "disallow_public_id" => TRUE));
     $this->api->delete_upload_preset($name);
 }