summaryrefslogtreecommitdiffstats
path: root/vendor/textalk/websocket/tests/scripts/client.connect-invalid-key.json
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/textalk/websocket/tests/scripts/client.connect-invalid-key.json')
-rw-r--r--vendor/textalk/websocket/tests/scripts/client.connect-invalid-key.json50
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/textalk/websocket/tests/scripts/client.connect-invalid-key.json b/vendor/textalk/websocket/tests/scripts/client.connect-invalid-key.json
new file mode 100644
index 0000000..6472317
--- /dev/null
+++ b/vendor/textalk/websocket/tests/scripts/client.connect-invalid-key.json
@@ -0,0 +1,50 @@
+[
+ {
+ "function": "stream_context_create",
+ "params": [],
+ "return": "@mock-stream-context"
+ },
+ {
+ "function": "stream_socket_client",
+ "params": [
+ "tcp:\/\/localhost:8000",
+ null,
+ null,
+ 5,
+ 4,
+ "@mock-stream-context"
+ ],
+ "return": "@mock-stream"
+ },
+ {
+ "function": "get_resource_type",
+ "params": [
+ "@mock-stream"
+ ],
+ "return": "stream"
+ },
+ {
+ "function": "stream_set_timeout",
+ "params": [
+ "@mock-stream",
+ 5
+ ],
+ "return": true
+ },
+ {
+ "function": "fwrite",
+ "params": [
+ "@mock-stream"
+ ],
+ "return": 199
+ },
+ {
+ "function": "stream_get_line",
+ "params": [
+ "@mock-stream",
+ 1024,
+ "\r\n\r\n"
+ ],
+ "return": "HTTP\/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: BAD"
+ }
+] \ No newline at end of file