From: Stricted Date: Sat, 18 Jul 2015 18:07:03 +0000 (+0200) Subject: update tests X-Git-Tag: 1.0.3~6 X-Git-Url: https://git.stricted.de/?p=GitHub%2FStricted%2Fspeedport-hybrid-php-api.git;a=commitdiff_plain;h=b383ace1416d5c73f7299102de7619056049a90b update tests --- diff --git a/SpeedportHybrid.class.php b/SpeedportHybrid.class.php index cd68051..5a1e0c1 100644 --- a/SpeedportHybrid.class.php +++ b/SpeedportHybrid.class.php @@ -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 index 0000000..9468788 --- /dev/null +++ b/tests/Data.class.php @@ -0,0 +1,96 @@ + + * @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'); + } +} diff --git a/tests/arp.php b/tests/arp.php index 8724fcd..3b85af0 100644 --- a/tests/arp.php +++ b/tests/arp.php @@ -1,4 +1,4 @@ getData('arp')); +print_r($sp->getArp()); $sp->logout(); diff --git a/tests/bonding_client.php b/tests/bonding_client.php index dbcc162..5b56200 100644 --- a/tests/bonding_client.php +++ b/tests/bonding_client.php @@ -1,4 +1,4 @@ getData('bonding_client')); +print_r($sp->getBondingClient()); $sp->logout(); diff --git a/tests/bonding_tr181.php b/tests/bonding_tr181.php index 03489bf..03f5e63 100644 --- a/tests/bonding_tr181.php +++ b/tests/bonding_tr181.php @@ -1,4 +1,4 @@ getData('bonding_tr181')); +print_r($sp->getBondingTR181()); $sp->logout(); diff --git a/tests/bonding_tunnel.php b/tests/bonding_tunnel.php index 8900b47..94b1e8f 100644 --- a/tests/bonding_tunnel.php +++ b/tests/bonding_tunnel.php @@ -1,4 +1,4 @@ getData('bonding_tunnel')); +print_r($sp->getBondingTunnel()); $sp->logout(); diff --git a/tests/dhcp_client.php b/tests/dhcp_client.php index bb4dc5f..047c3d8 100644 --- a/tests/dhcp_client.php +++ b/tests/dhcp_client.php @@ -1,4 +1,4 @@ getData('dhcp_client')); +print_r($sp->getDHCPClient()); $sp->logout(); diff --git a/tests/dhcp_server.php b/tests/dhcp_server.php index cbae665..180de9f 100644 --- a/tests/dhcp_server.php +++ b/tests/dhcp_server.php @@ -1,4 +1,4 @@ getData('dhcp_server')); +print_r($sp->getDHCPServer()); $sp->logout(); diff --git a/tests/dns.php b/tests/dns.php index 8cb5235..a5e75a1 100644 --- a/tests/dns.php +++ b/tests/dns.php @@ -1,4 +1,4 @@ getData('dns')); +print_r($sp->getDNS()); $sp->logout(); diff --git a/tests/dsl.php b/tests/dsl.php index a767d59..a913f45 100644 --- a/tests/dsl.php +++ b/tests/dsl.php @@ -1,4 +1,4 @@ getData('dsl')); +print_r($sp->getDSL()); $sp->logout(); diff --git a/tests/example.config.php b/tests/example.config.php index c6a6347..027f7f7 100644 --- a/tests/example.config.php +++ b/tests/example.config.php @@ -1,6 +1,6 @@ login($password); diff --git a/tests/filterlist.php b/tests/filterlist.php index 68ff9ff..1241a1d 100644 --- a/tests/filterlist.php +++ b/tests/filterlist.php @@ -1,4 +1,4 @@ getData('filterlist')); +print_r($sp->getFilterList()); $sp->logout(); diff --git a/tests/igmp_proxy.php b/tests/igmp_proxy.php index d2a827c..c3a0649 100644 --- a/tests/igmp_proxy.php +++ b/tests/igmp_proxy.php @@ -1,4 +1,4 @@ getData('igmp_proxy')); +print_r($sp->getIGMPProxy()); $sp->logout(); diff --git a/tests/igmp_snooping.php b/tests/igmp_snooping.php index 994428d..4cdd813 100644 --- a/tests/igmp_snooping.php +++ b/tests/igmp_snooping.php @@ -1,4 +1,4 @@ getData('igmp_snooping')); +print_r($sp->getIGMPSnooping()); $sp->logout(); diff --git a/tests/interfaces.php b/tests/interfaces.php index f2e3427..4d6fe35 100644 --- a/tests/interfaces.php +++ b/tests/interfaces.php @@ -1,4 +1,4 @@ getData('interfaces')); +print_r($sp->getInterfaces()); $sp->logout(); diff --git a/tests/ipv6.php b/tests/ipv6.php index 3b37a65..86e68e4 100644 --- a/tests/ipv6.php +++ b/tests/ipv6.php @@ -1,4 +1,4 @@ getData('ipv6')); +print_r($sp->getIPv6()); $sp->logout(); diff --git a/tests/lteinfo.php b/tests/lteinfo.php index ddcd872..4d6fe35 100644 --- a/tests/lteinfo.php +++ b/tests/lteinfo.php @@ -1,4 +1,4 @@ getData('lteinfo')); +print_r($sp->getInterfaces()); $sp->logout(); diff --git a/tests/memory.php b/tests/memory.php index dcbe584..42b0b31 100644 --- a/tests/memory.php +++ b/tests/memory.php @@ -1,4 +1,4 @@ getData('memory')); +print_r($sp->getMemory()); $sp->logout(); diff --git a/tests/module.php b/tests/module.php index e57e8a8..0da26e8 100644 --- a/tests/module.php +++ b/tests/module.php @@ -1,4 +1,4 @@ getData('module')); +print_r($sp->getModule()); $sp->logout(); diff --git a/tests/routing.php b/tests/routing.php index d195b3d..b0c6165 100644 --- a/tests/routing.php +++ b/tests/routing.php @@ -1,4 +1,4 @@ getData('routing')); +print_r($sp->getRouting()); $sp->logout(); diff --git a/tests/session.php b/tests/session.php index 9853145..5e3e871 100644 --- a/tests/session.php +++ b/tests/session.php @@ -1,4 +1,4 @@ getData('session')); +print_r($sp->getSession()); $sp->logout(); diff --git a/tests/speed.php b/tests/speed.php index 66a6f27..465917f 100644 --- a/tests/speed.php +++ b/tests/speed.php @@ -1,4 +1,4 @@ getData('speed')); +print_r($sp->getSpeed()); $sp->logout(); diff --git a/tests/status.php b/tests/status.php index 6cfe3f5..ae425ef 100644 --- a/tests/status.php +++ b/tests/status.php @@ -1,4 +1,4 @@ getData('status')); +print_r($sp->getStatus()); $sp->logout(); diff --git a/tests/webdav.php b/tests/webdav.php index cc1d69d..8d5bd89 100644 --- a/tests/webdav.php +++ b/tests/webdav.php @@ -1,4 +1,4 @@ getData('webdav')); +print_r($sp->getWebDAV()); $sp->logout(); diff --git a/tests/wlan.php b/tests/wlan.php index fa37a8e..e148e81 100644 --- a/tests/wlan.php +++ b/tests/wlan.php @@ -1,4 +1,4 @@ getData('wlan')); +print_r($sp->getWLAN()); $sp->logout();