/** * @depends testNewEmptyImportedURLAttachmentItemGroup */ public function testEditImportedURLAttachmentItemGroup($newItemData) { $key = $newItemData['key']; $version = $newItemData['version']; $json = json_decode($newItemData['content']); $props = array("contentType", "charset", "filename", "md5", "mtime"); foreach ($props as $prop) { $json2 = clone $json; $json2->{$prop} = "new" . ucwords($prop); $response = API::groupPut(self::$config['ownedPrivateGroupID'], "items/{$key}?key=" . self::$config['apiKey'], 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()); } }