let DEV_2 be trunk
[m6w6/ext-http] / tests / version001.phpt
diff --git a/tests/version001.phpt b/tests/version001.phpt
new file mode 100644 (file)
index 0000000..52acba6
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+version parse error
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+error_reporting(E_ALL);
+$m = new http\Message;
+try {
+       $m->setHttpVersion("1-1");
+       $m->setHttpVersion("one.one");
+} catch (http\Exception $e) {
+       echo $e->getMessage(),"\n";
+}
+?>
+--EXPECTF--
+Notice: http\Message::setHttpVersion(): Non-standard version separator '-' in HTTP protocol version '1-1' in %s
+http\Message::setHttpVersion(): Could not parse HTTP protocol version 'one.one'
+