Beispiel #1
0
 private function _testPatchExistingObjectsWithOldVersionProperty($objectType)
 {
     $objectTypePlural = API::getPluralObjectType($objectType);
     $key = API::createDataObject($objectType, 'key');
     $json = API::createUnsavedDataObject($objectType);
     $json['key'] = $key;
     $json['version'] = 1;
     $response = API::userPost(self::$config['userID'], "{$objectTypePlural}", json_encode([$json]), array("Content-Type: application/json"));
     $this->assert412ForObject($response);
 }