summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-11-30 12:56:36 +0000
committerGitHub <[email protected]>2020-11-30 12:56:36 +0000
commita2e7b9ffc39ae982d63a1a87dc358447d35d8bc9 (patch)
tree2389d2e3756788a689a64cf12bcde7de38dccb27 /service
parent561003b0b66a4f767782552a9282d824b08831be (diff)
parent9557eaed0dff03b1d550b608fd13d02c85532a1f (diff)
Merge #419
419: Allow PHP 8.0 r=48d90782 a=VitalyArt Co-authored-by: Π’ΠΈΡ‚Π°Π»ΠΈΠΉ ΠΡ€Ρ‚Π΅ΠΌΡŒΠ΅Π² <[email protected]> Co-authored-by: Vitaly Artemev <[email protected]>
Diffstat (limited to 'service')
-rw-r--r--service/http/handler_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/service/http/handler_test.go b/service/http/handler_test.go
index cb1cd728..bc22183d 100644
--- a/service/http/handler_test.go
+++ b/service/http/handler_test.go
@@ -722,8 +722,14 @@ func TestHandler_FormData_POST_Overwrite(t *testing.T) {
form := url.Values{}
- form.Add("key", "value1")
- form.Add("key", "value2")
+ form.Add("key", "value")
+ form.Add("name[]", "name1")
+ form.Add("name[]", "name2")
+ form.Add("name[]", "name3")
+ form.Add("arr[x][y][z]", "y")
+ form.Add("arr[x][y][e]", "f")
+ form.Add("arr[c]p", "l")
+ form.Add("arr[c]z", "")
req, err := http.NewRequest("POST", "http://localhost"+hs.Addr, strings.NewReader(form.Encode()))
assert.NoError(t, err)
@@ -746,7 +752,7 @@ func TestHandler_FormData_POST_Overwrite(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, 200, r.StatusCode)
- assert.Equal(t, `{"key":"value2","arr":{"x":{"y":null}}}`, string(b))
+ assert.Equal(t, `{"arr":{"c":{"p":"l","z":""},"x":{"y":{"e":"f","z":"y"}}},"key":"value","name":["name1","name2","name3"]}`, string(b))
}
func TestHandler_FormData_POST_Form_UrlEncoded_Charset(t *testing.T) {