/** * @depends testNewEmptyImportedURLAttachmentItemGroup */ public function testEditImportedURLAttachmentItemGroup($json) { $key = $json['key']; $version = $json['version']; $props = array("contentType", "charset", "filename", "md5", "mtime"); foreach ($props as $prop) { $json2 = $json; $json2[$prop] = "new" . ucwords($prop); $response = API::groupPut( self::$config['ownedPrivateGroupID'], "items/$key", json_encode($json2), array( "Content-Type: application/json", "If-Unmodified-Since-Version: $version" ) ); $this->assert400($response); $this->assertEquals("Cannot change '$prop' directly in group library", $response->getBody()); } }