Permalink
Browse files

sample data for tests/test_parser.php

git-svn-id: http://svn.php.net/repository/pear/packages/Net_Ping/trunk@249158 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 33b462c commit 1804b4b3a5464575b833316e8cf61e113d0caa31 Craig Constantine committed Dec 27, 2007
Showing with 1,037 additions and 0 deletions.
  1. +35 −0 tests/test_parser_data/test_data_01.php
  2. +36 −0 tests/test_parser_data/test_data_02.php
  3. +33 −0 tests/test_parser_data/test_data_03.php
  4. +41 −0 tests/test_parser_data/test_data_04.php
  5. +31 −0 tests/test_parser_data/test_data_05.php
  6. +19 −0 tests/test_parser_data/test_data_06.php
  7. +20 −0 tests/test_parser_data/test_data_07.php
  8. +24 −0 tests/test_parser_data/test_data_08.php
  9. +24 −0 tests/test_parser_data/test_data_09.php
  10. +30 −0 tests/test_parser_data/test_data_10.php
  11. +31 −0 tests/test_parser_data/test_data_11.php
  12. +31 −0 tests/test_parser_data/test_data_12.php
  13. +31 −0 tests/test_parser_data/test_data_13.php
  14. +31 −0 tests/test_parser_data/test_data_14.php
  15. +24 −0 tests/test_parser_data/test_data_15.php
  16. +31 −0 tests/test_parser_data/test_data_16.php
  17. +24 −0 tests/test_parser_data/test_data_17.php
  18. +31 −0 tests/test_parser_data/test_data_18.php
  19. +31 −0 tests/test_parser_data/test_data_19.php
  20. +24 −0 tests/test_parser_data/test_data_20.php
  21. +31 −0 tests/test_parser_data/test_data_21.php
  22. +19 −0 tests/test_parser_data/test_data_22.php
  23. +31 −0 tests/test_parser_data/test_data_23.php
  24. +33 −0 tests/test_parser_data/test_data_24.php
  25. +19 −0 tests/test_parser_data/test_data_25.php
  26. +31 −0 tests/test_parser_data/test_data_26.php
  27. +19 −0 tests/test_parser_data/test_data_27.php
  28. +20 −0 tests/test_parser_data/test_data_28.php
  29. +33 −0 tests/test_parser_data/test_data_29.php
  30. +31 −0 tests/test_parser_data/test_data_30.php
  31. +31 −0 tests/test_parser_data/test_data_31.php
  32. +24 −0 tests/test_parser_data/test_data_32.php
  33. +20 −0 tests/test_parser_data/test_data_33.php
  34. +20 −0 tests/test_parser_data/test_data_34.php
  35. +28 −0 tests/test_parser_data/test_data_35.php
  36. +65 −0 tests/test_parser_data/test_data_36.php
@@ -0,0 +1,35 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] ="PING example.com (192.0.34.166): 56 data bytes";
+$input[] ="64 bytes from 192.0.34.166: icmp_seq=0 ttl=53 time=385.571 ms";
+$input[] ="64 bytes from 192.0.34.166: icmp_seq=1 ttl=53 time=173.176 ms";
+$input[] ="64 bytes from 192.0.34.166: icmp_seq=2 ttl=53 time=173.338 ms";
+$input[] ="64 bytes from 192.0.34.166: icmp_seq=3 ttl=53 time=173.915 ms";
+$input[] ="64 bytes from 192.0.34.166: icmp_seq=4 ttl=53 time=172.543 ms";
+$input[] ="";
+$input[] ="----example.com PING Statistics----";
+$input[] ="5 packets transmitted, 5 packets received, 0.0% packet loss";
+$input[] ="round-trip min/avg/max/stddev = 172.543/215.709/385.571/94.957 ms";
+
+$expect['min'] = 172.543;
+$expect['avg'] = 215.709;
+$expect['max'] = 385.571;
+$expect['stddev'] = 94.957;
+$expect['ttl'] = 53;
+$expect['bytesperreq'] = 64;
+$expect['received'] = 5;
+$expect['transmitted'] = 5;
+$expect['loss'] = 0;
+$expect['bytestotal'] = 320;
+$expect['targetip'] = '192.0.34.166';
+$expect['icmpseq'][0] = 385.571;
+$expect['icmpseq'][1] = 173.176;
+$expect['icmpseq'][2] = 173.338;
+$expect['icmpseq'][3] = 173.915;
+$expect['icmpseq'][4] = 172.543;
+
+?>
@@ -0,0 +1,36 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "PING example.com (192.0.34.166): 56 data bytes";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=0 ttl=49 time=174.300 ms";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=1 ttl=49 time=174.174 ms";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=2 ttl=49 time=181.501 ms";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=3 ttl=49 time=184.189 ms";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=4 ttl=49 time=205.475 ms";
+$input[] = "";
+$input[] = "--- example.com ping statistics ---";
+$input[] = "5 packets transmitted, 5 packets received, 0% packet loss";
+$input[] = "round-trip min/avg/max/stddev = 174.174/183.928/205.475/11.472 ms";
+
+$expect['min'] = 174.174;
+$expect['avg'] = 183.928;
+$expect['max'] = 205.475;
+$expect['stddev'] = 11.472;
+$expect['ttl'] = 49;
+$expect['bytesperreq'] = 64;
+$expect['received'] = 5;
+$expect['transmitted'] = 5;
+$expect['loss'] = 0;
+$expect['bytestotal'] = 320;
+$expect['targetip'] = '192.0.34.166';
+$expect['icmpseq'][0] = 174.300;
+$expect['icmpseq'][1] = 174.174;
+$expect['icmpseq'][2] = 181.501;
+$expect['icmpseq'][3] = 184.189;
+$expect['icmpseq'][4] = 205.475;
+
+
+?>
@@ -0,0 +1,33 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "PING example.com (192.0.34.166): 56 data bytes";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=0 ttl=49 time=255.62 ms";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=1 ttl=49 time=277.685 ms";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=2 ttl=49 time=342.039 ms";
+$input[] = "64 bytes from 192.0.34.166: icmp_seq=3 ttl=49 time=290.769 ms";
+$input[] = "";
+$input[] = "--- example.com ping statistics ---";
+$input[] = "4 packets transmitted, 4 packets received, 0% packet loss";
+$input[] = "round-trip min/avg/max = 255.62/291.528/342.039 ms";
+
+$expect['min'] = 255.62;
+$expect['avg'] = 291.528;
+$expect['max'] = 342.039;
+$expect['stddev'] = NULL;
+$expect['ttl'] = 49;
+$expect['bytesperreq'] = 64;
+$expect['received'] = 4;
+$expect['transmitted'] = 4;
+$expect['loss'] = 0;
+$expect['bytestotal'] = 256;
+$expect['targetip'] = '192.0.34.166';
+$expect['icmpseq'][0] = 255.62;
+$expect['icmpseq'][1] = 277.685;
+$expect['icmpseq'][2] = 342.039;
+$expect['icmpseq'][3] = 290.769;
+
+?>
@@ -0,0 +1,41 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "PING oracle.com: (148.87.9.44): 56 data bytes";
+$input[] = "64 bytes from 148.87.9.44: icmp_seq=0 ttl=245 time=891 ms";
+$input[] = "64 bytes from 148.87.9.44: icmp_seq=1 ttl=245 time=882 ms";
+$input[] = "64 bytes from 148.87.9.44: icmp_seq=2 ttl=245 time=868 ms";
+$input[] = "64 bytes from 148.87.9.44: icmp_seq=3 ttl=245 time=848 ms";
+$input[] = "64 bytes from 148.87.9.44: icmp_seq=5 ttl=245 time=820 ms";
+$input[] = "64 bytes from 148.87.9.44: icmp_seq=7 ttl=245 time=773 ms";
+$input[] = "64 bytes from 148.87.9.44: icmp_seq=8 ttl=245 time=855 ms";
+$input[] = "64 bytes from 148.87.9.44: icmp_seq=9 ttl=245 time=865 ms";
+$input[] = "";-
+$input[] = "---oracle.com PING Statistics----";
+$input[] = "10 packets transmitted, 10 packets received, 0% packet loss";
+$input[] = "round-trip min/avg/max = 773/848/891 ms";
+
+$expect['min'] = 773;
+$expect['avg'] = 848;
+$expect['max'] = 891;
+$expect['stddev'] = NULL;
+$expect['ttl'] = 245;
+$expect['bytesperreq'] = 64;
+$expect['received'] = 10;
+$expect['transmitted'] = 10;
+$expect['loss'] = 0;
+$expect['bytestotal'] = 640;
+$expect['targetip'] = '148.87.9.44';
+$expect['icmpseq'][0] = 891;
+$expect['icmpseq'][1] = 882;
+$expect['icmpseq'][2] = 868;
+$expect['icmpseq'][3] = 848;
+$expect['icmpseq'][5] = 820;
+$expect['icmpseq'][7] = 773;
+$expect['icmpseq'][8] = 855;
+$expect['icmpseq'][9] = 865;
+
+?>
@@ -0,0 +1,31 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[]="PING example.com: 64 byte packets";
+$input[]="64 bytes from 192.0.34.166: icmp_seq=0. time=257. ms";
+$input[]="64 bytes from 192.0.34.166: icmp_seq=1. time=280. ms";
+$input[]="64 bytes from 192.0.34.166: icmp_seq=2. time=231. ms";
+$input[]="";
+$input[]="----example.com PING Statistics----";
+$input[]="3 packets transmitted, 3 packets received, 0% packet loss";
+$input[]="round-trip (ms) min/avg/max = 231/256/280";
+
+$expect['min'] = 231;
+$expect['max'] = 280;
+$expect['avg'] = 256;
+$expect['stddev'] = NULL;
+$expect['ttl'] = NULL;
+$expect['bytesperreq'] = 64;
+$expect['received'] = 3;
+$expect['transmitted'] = 3;
+$expect['loss'] = 0;
+$expect['bytestotal'] = 192;
+$expect['targetip'] = '192.0.34.166';
+$expect['icmpseq'][0] = 257;
+$expect['icmpseq'][1] = 280;
+$expect['icmpseq'][2] = 231;
+
+?>
@@ -0,0 +1,19 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "PING 209.92.3.80 (209.92.3.80): 56 data bytes";
+$input[] = "";
+$input[] = "--- 209.92.3.80 ping statistics ---";
+$input[] = "3 packets transmitted, 0 packets received, 100% packet loss";
+
+$expect['bytesperreq'] = 64;
+$expect['received'] = 0;
+$expect['transmitted'] = 3;
+$expect['loss'] = 100;
+$expect['bytestotal'] = 192;
+$expect['targetip'] = '209.92.3.80';
+
+?>
@@ -0,0 +1,20 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "PING 209.92.3.80 (209.92.3.80) 56(84) bytes of data.";
+$input[] = "";
+$input[] = "--- 209.92.3.80 ping statistics ---";
+$input[] = "3 packets transmitted, 0 received, 100% packet loss, time 1999ms";
+$input[] = "";
+
+$expect['bytesperreq'] = 64;
+$expect['received'] = 0;
+$expect['transmitted'] = 3;
+$expect['loss'] = 100;
+$expect['bytestotal'] = 192;
+$expect['targetip'] = '209.92.3.80';
+
+?>
@@ -0,0 +1,24 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "";
+$input[] = "Pinging 209.92.3.80 with 32 bytes of data:";
+$input[] = "";
+$input[] = "Request timed out.";
+$input[] = "Request timed out.";
+$input[] = "Request timed out.";
+$input[] = "";
+$input[] = "Ping statistics for 209.92.3.80:";
+$input[] = " Packets: Sent = 3, Received = 0, Lost = 3 (100% loss),";
+
+$expect['bytesperreq'] = 40; // 32b data plus 8b icmp header
+$expect['received'] = 0;
+$expect['transmitted'] = 3;
+$expect['loss'] = 100;
+$expect['bytestotal'] = 120;
+$expect['targetip'] = '209.92.3.80';
+
+?>
@@ -0,0 +1,24 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "";
+$input[] = "Pinging www.l.google.com [64.233.167.147] with 32 bytes of data:";
+$input[] = "";
+$input[] = "Request timed out.";
+$input[] = "Request timed out.";
+$input[] = "Request timed out.";
+$input[] = "";
+$input[] = "Ping statistics for 64.233.167.147:";
+$input[] = " Packets: Sent = 3, Received = 0, Lost = 3 (100% loss),";
+
+$expect['bytesperreq'] = 40; // 32b data plus 8b icmp header (presumed)
+$expect['received'] = 0;
+$expect['transmitted'] = 3;
+$expect['loss'] = 100;
+$expect['bytestotal'] = 120;
+$expect['targetip'] = '64.233.167.147';
+
+?>
@@ -0,0 +1,30 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "PING 10.134.33.137: (10.134.33.137): 56 data bytes";
+$input[] = "64 bytes from 10.134.33.137: icmp_seq=0 ttl=61 time=0 ms";
+$input[] = "64 bytes from 10.134.33.137: icmp_seq=1 ttl=61 time=0 ms";
+$input[] = "64 bytes from 10.134.33.137: icmp_seq=2 ttl=61 time=0 ms";
+$input[] = "";
+$input[] = "----10.134.33.137 PING Statistics----";
+$input[] = "3 packets transmitted, 3 packets received, 0% packet loss";
+$input[] = "round-trip min/avg/max = 0/0/0 ms";
+
+$expect['min'] = 0;
+$expect['avg'] = 0;
+$expect['max'] = 0;
+$expect['ttl'] = 61;
+$expect['bytesperreq'] = 64;
+$expect['received'] = 3;
+$expect['transmitted'] = 3;
+$expect['loss'] = 0;
+$expect['bytestotal'] = 192;
+$expect['targetip'] = '10.134.33.137';
+$expect['icmpseq'][0] = 0;
+$expect['icmpseq'][1] = 0;
+$expect['icmpseq'][2] = 0;
+
+?>
@@ -0,0 +1,31 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "PING www.l.google.com (72.14.209.99): 56 data bytes";
+$input[] = "64 bytes from 72.14.209.99: icmp_seq=0 ttl=239 time=119.040 ms";
+$input[] = "64 bytes from 72.14.209.99: icmp_seq=1 ttl=239 time=101.597 ms";
+$input[] = "64 bytes from 72.14.209.99: icmp_seq=2 ttl=239 time=106.619 ms";
+$input[] = "";
+$input[] = "--- www.l.google.com ping statistics ---";
+$input[] = "3 packets transmitted, 3 packets received, 0% packet loss";
+$input[] = "round-trip min/avg/max/stddev = 101.597/109.085/119.040/7.332 ms";
+
+$expect['min'] = 101.597;
+$expect['avg'] = 109.085;
+$expect['max'] = 119.040;
+$expect['stddev'] = 7.332;
+$expect['ttl'] = 239;
+$expect['bytesperreq'] = 64;
+$expect['received'] = 3;
+$expect['transmitted'] = 3;
+$expect['loss'] = 0;
+$expect['bytestotal'] = 192;
+$expect['targetip'] = '72.14.209.99';
+$expect['icmpseq'][0] = 119.040;
+$expect['icmpseq'][1] = 101.597;
+$expect['icmpseq'][2] = 106.619;
+
+?>
@@ -0,0 +1,31 @@
+<?php
+// $Id$
+
+// Define $input to be an array containing all of the output from some
+// ping command
+
+$input[] = "PING www.l.google.com (64.233.167.99): 56 data bytes";
+$input[] = "64 bytes from 64.233.167.99: icmp_seq=0 ttl=248 time=1.763 ms";
+$input[] = "64 bytes from 64.233.167.99: icmp_seq=1 ttl=248 time=1.752 ms";
+$input[] = "64 bytes from 64.233.167.99: icmp_seq=2 ttl=248 time=1.903 ms";
+$input[] = "";
+$input[] = "--- www.l.google.com ping statistics ---";
+$input[] = "3 packets transmitted, 3 packets received, 0% packet loss";
+$input[] = "round-trip min/avg/max/stddev = 1.752/1.806/1.903/0.069 ms";
+
+$expect['min'] = 1.752;
+$expect['avg'] = 1.806;
+$expect['max'] = 1.903;
+$expect['stddev'] = 0.069;
+$expect['ttl'] = 248;
+$expect['bytesperreq'] = 64;
+$expect['received'] = 3;
+$expect['transmitted'] = 3;
+$expect['loss'] = 0;
+$expect['bytestotal'] = 192;
+$expect['targetip'] = '64.233.167.99';
+$expect['icmpseq'][0] = 1.763;
+$expect['icmpseq'][1] = 1.752;
+$expect['icmpseq'][2] = 1.903;
+
+?>
Oops, something went wrong.

0 comments on commit 1804b4b

Please sign in to comment.