aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2010-12-17 09:01:37 +0100
committerChristian Weiske <cweiske@cweiske.de>2010-12-17 09:01:37 +0100
commit85f7ff92a4c5ef908fe063d9e88028dc239ff0dd (patch)
treefc11ca9eb7845cb65fa3a08039f0772d6ec8a7a0 /tests
parent0f92c156212e32beb269055165cb77f1f8a1d5bf (diff)
downloadlinksys-wrt3g-tools-85f7ff92a4c5ef908fe063d9e88028dc239ff0dd.tar.gz
linksys-wrt3g-tools-85f7ff92a4c5ef908fe063d9e88028dc239ff0dd.zip
test for noauth status page without connection; add support for connection status in status_noauth
Diffstat (limited to 'tests')
-rw-r--r--tests/status_noauth-aquiring.phpt35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/status_noauth-aquiring.phpt b/tests/status_noauth-aquiring.phpt
new file mode 100644
index 0000000..8c6c5d4
--- /dev/null
+++ b/tests/status_noauth-aquiring.phpt
@@ -0,0 +1,35 @@
+--TEST--
+test Wrt3g_HtmlParser::status_noauth() when we have no conection
+--FILE--
+<?php
+chdir(dirname(__FILE__));
+require_once dirname(__FILE__) . '/../Wrt3g/HtmlParser.php';
+$p = new Wrt3g_HtmlParser();
+var_dump(
+ $p->status_noauth(
+ file_get_contents('status_noauth-aquiring.htm')
+ )
+);
+--EXPECT--
+array(10) {
+ ["connection"]=>
+ string(10) "connecting"
+ ["type"]=>
+ NULL
+ ["network"]=>
+ NULL
+ ["signal strength"]=>
+ NULL
+ ["connection time"]=>
+ NULL
+ ["session usage"]=>
+ NULL
+ ["card model"]=>
+ string(29) "GlobeTrotter Fusion Quad Lite"
+ ["card revision"]=>
+ string(3) "4.1"
+ ["card firmware"]=>
+ string(42) "1.5.5 (Date: May 17 2005, Time: 14:55:44)"
+ ["IMSI"]=>
+ string(15) "262032010984707"
+} \ No newline at end of file