Script to test an incoming call with the currently configured loggers
[auerswald-callnotifier.git] / scripts / test-notification.php
1 <?php
2 namespace callnotifier;
3 require_once __DIR__ . '/../tests/bootstrap.php';
4
5 //dependencies for the config file
6 $config = new Config();
7 $log = new Log();
8 $log->debug = true;
9
10 $callMonitor = new CallMonitor($config, $log);
11
12 $cli = new CLI();
13 $configFile = $cli->getConfigFile();
14 if ($configFile === null) {
15     echo "No config file found\n";
16     exit(1);
17 }
18 require $configFile;
19
20
21
22 $call = new CallMonitor_Call();
23 $call->type  = 'i';
24 $call->from  = '03411234567';
25 //$call->fromName = 'Foo Bar';
26 $call->fromLocation = 'Leipzig';
27 $call->to    = '12345';
28 $call->start = strtotime('2013-08-03 20:11');
29 $call->end   = strtotime('2013-08-03 20:12');
30
31 $log->log('startingCall', array('call' => $call));
32
33 ?>