From: Michael Wallner Date: Thu, 12 Feb 2015 21:44:11 +0000 (+0100) Subject: rename info tests X-Git-Tag: RELEASE_2_3_0_RC1~36 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=046973e332c1475f9bf7717af9d33a75283deb37;p=m6w6%2Fext-http rename info tests --- diff --git a/tests/info.phpt b/tests/info.phpt deleted file mode 100644 index 373cb45..0000000 --- a/tests/info.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -phpinfo ---SKIPIF-- - ---FILE-- - -Done ---EXPECTF-- -Test -%a -HTTP Support => enabled -Extension Version => 2.%s -%a -Done diff --git a/tests/info001.phpt b/tests/info001.phpt new file mode 100644 index 0000000..370d70e --- /dev/null +++ b/tests/info001.phpt @@ -0,0 +1,60 @@ +--TEST-- +invalid HTTP info +--SKIPIF-- + +--FILE-- + +DONE +--EXPECTF-- +exception 'http\Exception\BadMessageException' with message 'Could not parse message: GET HTTP/1.1' in %s +Stack trace: +#0 %s: http\Message->__construct('GET HTTP/1.1') +#1 {main} +exception 'http\Exception\BadMessageException' with message 'Could not parse message: GET HTTP/1.123' in %s +Stack trace: +#0 %s: http\Message->__construct('GET HTTP/1.123') +#1 {main} +exception 'http\Exception\BadMessageException' with message 'Could not parse message: GETHTTP/1.1' in %s +Stack trace: +#0 %s: http\Message->__construct('GETHTTP/1.1') +#1 {main} +object(http\Message)#%d (9) { + ["type":protected]=> + int(1) + ["body":protected]=> + NULL + ["requestMethod":protected]=> + string(3) "GET" + ["requestUrl":protected]=> + string(1) "/" + ["responseStatus":protected]=> + string(0) "" + ["responseCode":protected]=> + int(0) + ["httpVersion":protected]=> + string(3) "1.1" + ["headers":protected]=> + array(0) { + } + ["parentMessage":protected]=> + NULL +} +DONE diff --git a/tests/info002.phpt b/tests/info002.phpt new file mode 100644 index 0000000..41bd7b4 --- /dev/null +++ b/tests/info002.phpt @@ -0,0 +1,49 @@ +--TEST-- +invalid HTTP info +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +Test +exception 'http\Exception\BadMessageException' with message 'Could not parse message: HTTP/1.1 99 Apples in my ' in %sinfo002.php:%d +Stack trace: +#0 %sinfo002.php(%d): http\Message->__construct('HTTP/1.1 99 App...') +#1 %sinfo002.php(%d): {closure}() +#2 %sinfo002.php(%d): trap(Object(Closure)) +#3 {main} +exception 'http\Exception\BadMessageException' with message 'Could not parse message: CONNECT HTTP/1.1' in %sinfo002.php:%d +Stack trace: +#0 %sinfo002.php(%d): http\Message->__construct('CONNECT HTTP/1....') +#1 %sinfo002.php(%d): {closure}() +#2 %sinfo002.php(%d): trap(Object(Closure)) +#3 {main} +HTTP/1.1 200 +CONNECT www.example.org:80 HTTP/1.1 +===DONE=== diff --git a/tests/info_001.phpt b/tests/info_001.phpt deleted file mode 100644 index 370d70e..0000000 --- a/tests/info_001.phpt +++ /dev/null @@ -1,60 +0,0 @@ ---TEST-- -invalid HTTP info ---SKIPIF-- - ---FILE-- - -DONE ---EXPECTF-- -exception 'http\Exception\BadMessageException' with message 'Could not parse message: GET HTTP/1.1' in %s -Stack trace: -#0 %s: http\Message->__construct('GET HTTP/1.1') -#1 {main} -exception 'http\Exception\BadMessageException' with message 'Could not parse message: GET HTTP/1.123' in %s -Stack trace: -#0 %s: http\Message->__construct('GET HTTP/1.123') -#1 {main} -exception 'http\Exception\BadMessageException' with message 'Could not parse message: GETHTTP/1.1' in %s -Stack trace: -#0 %s: http\Message->__construct('GETHTTP/1.1') -#1 {main} -object(http\Message)#%d (9) { - ["type":protected]=> - int(1) - ["body":protected]=> - NULL - ["requestMethod":protected]=> - string(3) "GET" - ["requestUrl":protected]=> - string(1) "/" - ["responseStatus":protected]=> - string(0) "" - ["responseCode":protected]=> - int(0) - ["httpVersion":protected]=> - string(3) "1.1" - ["headers":protected]=> - array(0) { - } - ["parentMessage":protected]=> - NULL -} -DONE diff --git a/tests/phpinfo.phpt b/tests/phpinfo.phpt new file mode 100644 index 0000000..373cb45 --- /dev/null +++ b/tests/phpinfo.phpt @@ -0,0 +1,19 @@ +--TEST-- +phpinfo +--SKIPIF-- + +--FILE-- + +Done +--EXPECTF-- +Test +%a +HTTP Support => enabled +Extension Version => 2.%s +%a +Done