moving the configuration changes into the single config class
[CBFWR.git] / unittests / mergetest.php
1 <?php
2 $CMD_ROOT_FS = realpath(dirname(__FILE__));
3 $AM_DAEMON = false;
4
5 global $CMD_ROOT_FS;
6 global $AM_DAEMON;
7
8 // add libglcas as if it were a path in ../libglcas
9 if(file_exists("../libcbfwr")) {
10         $path = realpath($CMD_ROOT_FS."/../");
11         error_log("added cbfwr path as $path");
12         set_include_path(get_include_path().PATH_SEPARATOR.$path);
13 }
14
15 // include the based library
16 require_once("libcbfwr/lib.php");
17
18 glcas_pluginLoader();
19
20 $config = new Config();
21 $comms = new Comms();
22
23 $conf1 = $comms->getConfig(0);
24 $config->setConfig($conf1);
25 $config->addConfigLine("delete hostname");
26 $config->addConfigLine("delete zone name internet");
27 $conf2 = $config->getConfig();
28
29 print_r($conf1);
30 print_r($conf2);
31 $config->addConfigLine("delete");
32
33 ?>