Tests fixed, I hope
This commit is contained in:
parent
27a43beddc
commit
5757a853f5
|
@ -756,12 +756,17 @@ trait AccountBase
|
|||
*/
|
||||
|
||||
$prefsObject = [];
|
||||
// Add 1024 keys
|
||||
for($i = 1000; $i < 2024; $i++) {
|
||||
$prefsObject["key" . $i] = "HelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHelloWorldHel";
|
||||
// Each key is 7 characters and value is 63 characters
|
||||
|
||||
$text1Kb = "";
|
||||
for($i = 0; $i < 1024; $i++) {
|
||||
$text1Kb .= "🍰";
|
||||
}
|
||||
// That makes total size minimum of 70kB, plus any JSON stuff. Max supported is 64kB, so this should exceed.
|
||||
|
||||
// Add 100 keys, each is 1kB
|
||||
for($i = 0; $i < 100; $i++) {
|
||||
$prefsObject["key" . $i] = $text1Kb;
|
||||
}
|
||||
// That makes total size minimum of 100kB, plus any JSON stuff. Max supported is 64kB, so this should exceed.
|
||||
|
||||
$response = $this->client->call(Client::METHOD_PATCH, '/account/prefs', array_merge([
|
||||
'origin' => 'http://localhost',
|
||||
|
@ -772,7 +777,7 @@ trait AccountBase
|
|||
'prefs' => $prefsObject
|
||||
]);
|
||||
|
||||
$this->assertEquals($response['headers']['status-code'], 400);
|
||||
$this->assertEquals(400, $response['headers']['status-code']);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue