]> granicus.if.org Git - php/commitdiff
first successful download test works :)
authorGreg Beaver <cellog@php.net>
Sun, 30 Nov 2003 22:37:47 +0000 (22:37 +0000)
committerGreg Beaver <cellog@php.net>
Sun, 30 Nov 2003 22:37:47 +0000 (22:37 +0000)
pear/tests/pear_common_downloadHttp.phpt

index e1c9cacc0eae70effed35d76d13cc5f036acf656..94bc45f9654b0de9b2e455f04662018969fa8bc7 100644 (file)
@@ -44,6 +44,12 @@ function catchit($err)
     echo "Caught error: " . $err->getMessage() . "\n";
 }
 
+echo "Test static:\n";
+echo "Simple: ";
+PEAR_Common::downloadHttp('http://test.pear.php.net/testdownload.tgz', $ui, $temp_path);
+$firstone = implode('', file(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'testdownload.tgz'));
+$secondone = implode('', file($temp_path . DIRECTORY_SEPARATOR . 'testdownload.tgz'));
+echo ($firstone == $secondone) ? "passed\n" : "failed\n";
 cleanall($temp_path);
 
 // ------------------------------------------------------------------------- //
@@ -68,3 +74,5 @@ function cleanall($dir)
 --GET--
 --POST--
 --EXPECT--
+Test static:
+Simple: passed
\ No newline at end of file