update tests
authorStricted <info@stricted.de>
Sat, 18 Jul 2015 18:07:03 +0000 (20:07 +0200)
committerStricted <info@stricted.de>
Sat, 18 Jul 2015 18:07:03 +0000 (20:07 +0200)
25 files changed:
SpeedportHybrid.class.php
tests/Data.class.php [new file with mode: 0644]
tests/arp.php
tests/bonding_client.php
tests/bonding_tr181.php
tests/bonding_tunnel.php
tests/dhcp_client.php
tests/dhcp_server.php
tests/dns.php
tests/dsl.php
tests/example.config.php
tests/filterlist.php
tests/igmp_proxy.php
tests/igmp_snooping.php
tests/interfaces.php
tests/ipv6.php
tests/lteinfo.php
tests/memory.php
tests/module.php
tests/routing.php
tests/session.php
tests/speed.php
tests/status.php
tests/webdav.php
tests/wlan.php

index cd68051d11d7da8623791e2396270b2c7e2c987f..5a1e0c169e682d42faad774b90ce0ed0ddb04ea4 100644 (file)
@@ -278,7 +278,7 @@ class SpeedportHybrid {
        private function exportData ($type) {
                if ($this->checkLogin() !== true) throw new Exception('you musst be logged in to use this method');
                
-               $path = 'data/ExportDialedCalls.json';
+               $path = 'data/Syslog.json';
                $fields = array('exporttype' => $type);
                $data = $this->sentRequest($path, $fields, true);
                
diff --git a/tests/Data.class.php b/tests/Data.class.php
new file mode 100644 (file)
index 0000000..9468788
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+require_once('../SpeedportHybrid.class.php');
+/**
+ * @author      Jan Altensen (Stricted)
+ * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @copyright   2015 Jan Altensen (Stricted)
+ */
+class Data extends SpeedportHybrid {
+       public function getDSL () {
+               return $this->getData('data/dsl.json');
+       }
+       
+       public function getInterfaces () {
+               return $this->getData('data/interfaces.json');
+       }
+       
+       public function getArp () {
+               return $this->getData('data/arp.json');
+       }
+       
+       public function getSession () {
+               return $this->getData('data/session.json');
+       }
+       
+       public function getDHCPClient () {
+               return $this->getData('data/dhcp_client.json');
+       }
+       
+       public function getDHCPServer () {
+               return $this->getData('data/dhcp_server.json');
+       }
+       
+       public function getIPv6 () {
+               return $this->getData('data/ipv6.json');
+       }
+       
+       public function getDNS () {
+               return $this->getData('data/dns.json');
+       }
+       
+       public function getRouting () {
+               return $this->getData('data/routing.json');
+       }
+       
+       public function getIGMPProxy () {
+               return $this->getData('data/igmp_proxy.json');
+       }
+       
+       public function getIGMPSnooping () {
+               return $this->getData('data/igmp_snooping.json');
+       }
+       
+       public function getWLAN () {
+               return $this->getData('data/wlan.json');
+       }
+       
+       public function getModule () {
+               return $this->getData('data/module.json');
+       }
+       
+       public function getMemory () {
+               return $this->getData('data/memory.json');
+       }
+       
+       public function getSpeed () {
+               return $this->getData('data/speed.json');
+       }
+       
+       public function getWebDAV () {
+               return $this->getData('data/webdav.json');
+       }
+       
+       public function getBondingClient () {
+               return $this->getData('data/bonding_client.json');
+       }
+       
+       public function getBondingTunnel () {
+               return $this->getData('data/bonding_tunnel.json');
+       }
+       
+       public function getFilterList () {
+               return $this->getData('data/filterlist.json');
+       }
+       
+       public function getBondingTR181 () {
+               return $this->getData('data/bonding_tr181.json');
+       }
+       
+       public function getLTEInfo () {
+               return $this->getData('data/letinfo.json');
+       }
+       
+       public function getStatus () {
+               return $this->getData('data/Status.json');
+       }
+}
index 8724fcd0373c077ffdb6ec4b30fb21fce97f5bc9..3b85af0e62939dbac84131d01c119fd6a2fa95f2 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('arp'));
+print_r($sp->getArp());
 $sp->logout();
index dbcc1629aa298d09ebdfef64dccf9f1190326efb..5b5620071a3e8ed487d8b0174c062a1c4df18018 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('bonding_client'));
+print_r($sp->getBondingClient());
 $sp->logout();
index 03489bf1d1d758c1118fa6a6e90f5a4412f54c23..03f5e63f6bf262491de29f665549cefc4d0aa0a9 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('bonding_tr181'));
+print_r($sp->getBondingTR181());
 $sp->logout();
index 8900b4709d1c0411de4c2a4ab4fbe161d30bc1c8..94b1e8f7f573b4027b89febe2113bdffbd8a4169 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('bonding_tunnel'));
+print_r($sp->getBondingTunnel());
 $sp->logout();
index bb4dc5fe0a58776d98e3d4a8f179743d30594bf8..047c3d8163c6b03eb2a2768c13655354f89d022e 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('dhcp_client'));
+print_r($sp->getDHCPClient());
 $sp->logout();
index cbae6655d7c6d3cbbbd4a6fde3f6f33a47be75d6..180de9f171d53351be5a3b75e4944493df463838 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('dhcp_server'));
+print_r($sp->getDHCPServer());
 $sp->logout();
index 8cb5235b6ae551765b3d551791471636f7f2efbf..a5e75a18b3e9838af670234c6b7787973dab07c3 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('dns'));
+print_r($sp->getDNS());
 $sp->logout();
index a767d59ee909db0616ba37e8438f87eaa67e7dac..a913f450d8a6b3be6ec7b26bebaf6f2d945bc876 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('dsl'));
+print_r($sp->getDSL());
 $sp->logout();
index c6a634722c42ac6279ca6a8cde68c82073953ac5..027f7f7f0df554f1c4014ab484eb2e31cf7babc4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
-require_once('../SpeedportHybrid.class.php');
+require_once('Data.class.php');
 $password = 'your_router_password';
 $url = 'http://speedport.ip/';
-$sp = new SpeedportHybrid($url);
+$sp = new Data($url);
 $sp->login($password);
index 68ff9ff3195da9e7e41c04edfb84f92741a39281..1241a1d873b276838101e2bfb8809ea66faae487 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('filterlist'));
+print_r($sp->getFilterList());
 $sp->logout();
index d2a827c05025ea2df671cf4d02731be2685f802b..c3a06499a9fe73f2b6f012e30b9029521083a603 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('igmp_proxy'));
+print_r($sp->getIGMPProxy());
 $sp->logout();
index 994428d2de2b6c220e28927a99ba2e96015b68be..4cdd8132b9e21514129eab55e6f704167b14c609 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('igmp_snooping'));
+print_r($sp->getIGMPSnooping());
 $sp->logout();
index f2e34271aa2a06ccb11b3a7c4eb69fdc3b93e040..4d6fe3507a7f51338afa932e3e1af498ca79efff 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('interfaces'));
+print_r($sp->getInterfaces());
 $sp->logout();
index 3b37a6542a14942f199eaf098fbb4ce02f1c93b6..86e68e4bf57ad718ebcbb56dfedc0cd6208323d7 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('ipv6'));
+print_r($sp->getIPv6());
 $sp->logout();
index ddcd872c495c6c22198c971ea71c3de43d0d40a6..4d6fe3507a7f51338afa932e3e1af498ca79efff 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('lteinfo'));
+print_r($sp->getInterfaces());
 $sp->logout();
index dcbe584bf2b84db0115667338c93ed955eae379f..42b0b3123f3cbdb87735ed25e0a6cb33a2440b4e 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('memory'));
+print_r($sp->getMemory());
 $sp->logout();
index e57e8a81418853186747e1c24c4e8ecec54bd6e0..0da26e87d5cce2fa0a61ea1d526b606e0afbb0fd 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('module'));
+print_r($sp->getModule());
 $sp->logout();
index d195b3de9e7732d6dd4e329e9aac7779006e7d37..b0c6165c9a20e34a6f55d52ee87fb3e1fb0a34c6 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('routing'));
+print_r($sp->getRouting());
 $sp->logout();
index 98531453f2b6c4eaf5e581b52013dc71302c8b09..5e3e871c0be80214135894127ae7da5eda16ed25 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('session'));
+print_r($sp->getSession());
 $sp->logout();
index 66a6f27079e39a58f3396ab662e59f3b9a63cc1e..465917f386ce300edf9727e844e82f9b4288451a 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('speed'));
+print_r($sp->getSpeed());
 $sp->logout();
index 6cfe3f52466bd0927d0798631844092709892655..ae425ef956c6f12afe9c7d0d72a075b39a5cae9d 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('status'));
+print_r($sp->getStatus());
 $sp->logout();
index cc1d69dc0e7dae077c7a0c9a950961fc2d8b14ff..8d5bd891c231aaa0b8d04e37694fa37bc615e82a 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('webdav'));
+print_r($sp->getWebDAV());
 $sp->logout();
index fa37a8e9b28f799d57b3d8c12ef493268eb5086d..e148e81efec016dc33ed5fe4740cf8b4bac85362 100644 (file)
@@ -1,4 +1,4 @@
 <?php
 require_once('config.php');
-print_r($sp->getData('wlan'));
+print_r($sp->getWLAN());
 $sp->logout();