test for index_wstatus2 in disconnected state
authorChristian Weiske <cweiske@cweiske.de>
Fri, 17 Dec 2010 07:53:48 +0000 (08:53 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 17 Dec 2010 07:53:48 +0000 (08:53 +0100)
tests/index_wstatus2-disconnected.phpt [new file with mode: 0644]

diff --git a/tests/index_wstatus2-disconnected.phpt b/tests/index_wstatus2-disconnected.phpt
new file mode 100644 (file)
index 0000000..e547e61
--- /dev/null
@@ -0,0 +1,17 @@
+--TEST--
+test Wrt3g_HtmlParser::index_wstatus1() when we have an excellent connection
+--FILE--
+<?php
+chdir(dirname(__FILE__));
+require_once dirname(__FILE__) . '/../Wrt3g/HtmlParser.php';
+$p = new Wrt3g_HtmlParser();
+var_dump(
+    $p->index_wstatus2(
+        file_get_contents('index_wstatus2-disconnected.htm')
+    )
+);
+--EXPECT--
+array(1) {
+  ["connection"]=>
+  string(12) "disconnected"
+}