From: Michael Wallner Date: Fri, 25 Sep 2015 11:27:50 +0000 (+0200) Subject: add missing test X-Git-Tag: RELEASE_2_5_3~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=edf77fd524b1303732dcf24e53f375789631d143;p=m6w6%2Fext-http add missing test --- diff --git a/tests/gh-issue12.phpt b/tests/gh-issue12.phpt new file mode 100644 index 0000000..0721586 --- /dev/null +++ b/tests/gh-issue12.phpt @@ -0,0 +1,31 @@ +--TEST-- +crash with bad url passed to http\Message::setRequestUrl() +--SKIPIF-- + +--FILE-- +setRequestUrl($url); + printf("OK: %s\n", $url); + } catch (Exception $e) { + printf("%s\n", $e->getMessage()); + } +} + +?> +===DONE=== +--EXPECT-- +Test +http\Message::setRequestUrl(): Failed to parse host; unexpected '.' at pos 0 in '.foo.bar' +http\Message::setRequestUrl(): Failed to parse host; unexpected '.' at pos 4 in 'foo..bar' +OK: http://foo.bar. +===DONE===