Fixed issue #63
[m6w6/ext-http] / tests / gh-issue63.phpt
diff --git a/tests/gh-issue63.phpt b/tests/gh-issue63.phpt
new file mode 100644 (file)
index 0000000..e03b32f
--- /dev/null
@@ -0,0 +1,27 @@
+--TEST--
+segfault with Client::setDebug and Client::dequeue()
+--SKIPIF--
+<?php
+include "skipif.inc";
+skip_client_test();
+skip_online_test();
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+use http\QueryString;
+use http\Url;
+
+$url = 'http://example.com/?param=has+spaces';
+$query = ['foo' => 'bar'];
+$parts['query'] = new QueryString($query);
+echo (new Url($url, null, Url::STDFLAGS))->mod($parts)->toString();
+
+?>
+
+===DONE===
+--EXPECTF--
+Test
+http://example.com/?param=has%20spaces&foo=bar
+===DONE===