test for good connection
authorChristian Weiske <cweiske@cweiske.de>
Mon, 13 Dec 2010 07:16:41 +0000 (08:16 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 13 Dec 2010 07:16:41 +0000 (08:16 +0100)
tests/index_wstatus1-connected-good.phpt [new file with mode: 0644]

diff --git a/tests/index_wstatus1-connected-good.phpt b/tests/index_wstatus1-connected-good.phpt
new file mode 100644 (file)
index 0000000..a78bcc9
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+test Wrt3g_HtmlParser::index_wstatus1() when we have a good connection
+--FILE--
+<?php
+chdir(dirname(__FILE__));
+require_once dirname(__FILE__) . '/../Wrt3g/HtmlParser.php';
+$p = new Wrt3g_HtmlParser();
+var_dump(
+    $p->index_wstatus1(
+        file_get_contents('index_wstatus1-connected-good.htm')
+    )
+);
+--EXPECT--
+array(3) {
+  ["type"]=>
+  string(8) "GPRS"
+  ["network"]=>
+  string(8) "BASE DE"
+  ["signal strength"]=>
+  string(8) "good"
+}