hostgroup scanning works.
[glcas.git] / unittests / remoetfileexists.php
1 <?php
2
3 // begin unit test header
4 $WEB_ROOT_FS = realpath(dirname(__FILE__));
5 $BASE_URL = dirname($_SERVER["PHP_SELF"]);
6
7 global $WEB_ROOT_FS, $URL_HANDLERS, $BASE_URL;
8
9 if(file_exists("../libglcas")) {
10         $path = realpath($WEB_ROOT_FS."/../");
11         error_log("added glcas path as $path");
12         set_include_path(get_include_path().PATH_SEPARATOR.$path);
13 }
14 require_once("../libglcas/lib.php");
15
16
17 glcas_pluginLoader();
18
19
20 if(glcase_fileExists("http://ftp.iinet.net.au/pub/ubuntu/dists/hardy/Contents-amd64.gz")) {
21         echo "true - DOES EXIST: http://ftp.iinet.net.au/pub/ubuntu/dists/hardy/Contents-amd64.gz";
22 } else {
23         echo "FAIL - SAID DOES NOT EXIST: http://ftp.iinet.net.au/pub/ubuntu/dists/hardy/Contents-amd64.gz";
24 }
25
26 if(!glcase_fileExists("http://ftp.iinet.net.au/pub/ubuntu/dists/hardy/Contents-aaaaaaaamd64.gz")) {
27         echo "true - DOES NOT EXIST: http://ftp.iinet.net.au/pub/ubuntu/dists/hardy/Contents-aaaaaaaamd64.gz";
28 } else {
29         echo "FAIL - SAID DOES EXIST: http://ftp.iinet.net.au/pub/ubuntu/dists/hardy/Contents-aaaaaaaamd64.gz";
30 }
31
32 ?>