Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
PU_dcp.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 
7 namespace Dcp\Pu;
8 /**
9  * @author Anakeen
10  * @package Dcp\Pu
11  */
12 //require_once 'PHPUnit/Framework.php';
13 set_include_path(get_include_path() . PATH_SEPARATOR . "./DCPTEST:./WHAT");
14 
15 require_once 'WHAT/autoload.php';
16 // ...
18 {
19  const logFile = "/var/tmp/pudcp.log";
20  const msgFile = "/var/tmp/pudcp.msg";
21  public static $allInProgress = false;
22  public static function suite()
23  {
24  self::configure();
25  self::$allInProgress = true;
26  $suite = new FrameworkDcp('Project');
27 
28  $suite->addTest(SuiteDcp::suite());
29  $suite->addTest(SuiteDcpAttribute::suite());
30  $suite->addTest(SuiteDcpUser::suite());
31  $suite->addTest(SuiteDcpSecurity::suite());
32  // ...
33  printf("\nerror log in %s, messages in %s\n", self::logFile, self::msgFile);
34  return $suite;
35  }
36 
37  public static function configure()
38  {
39  @unlink(self::logFile);
40  ini_set("error_log", self::logFile);
41  file_put_contents(self::msgFile, strftime('%Y-%m-%d %T'));
42  }
43 
44  public static function addMessage($msg)
45  {
46 
47  if (!self::$allInProgress) {
48  print "$msg\n";
49  } else {
50  file_put_contents(self::msgFile, $msg, FILE_APPEND);
51  }
52  }
53 }
54 ?>
static configure()
Definition: PU_dcp.php:37
static addMessage($msg)
Definition: PU_dcp.php:44
static suite()
Definition: PU_dcp.php:22
static $allInProgress
Definition: PU_dcp.php:21
print
Definition: checklist.php:49
← centre documentaire © anakeen