Core
3.2
PHP API documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
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
// ...
17
class
TestSuiteDcp
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
?>
Dcp\Pu\TestSuiteDcp
Definition:
PU_dcp.php:17
Dcp\Pu\SuiteDcpUser\suite
static suite()
Definition:
PU_suite_dcp_users.php:15
Dcp\Pu\TestSuiteDcp\configure
static configure()
Definition:
PU_dcp.php:37
Dcp\Pu\TestSuiteDcp\addMessage
static addMessage($msg)
Definition:
PU_dcp.php:44
Dcp\Pu\TestSuiteDcp\suite
static suite()
Definition:
PU_dcp.php:22
Dcp\Pu\SuiteDcp\suite
static suite()
Definition:
PU_suite_dcp.php:15
Dcp\Pu\TestSuiteDcp\logFile
const logFile
Definition:
PU_dcp.php:19
Dcp\Pu\FrameworkDcp
Definition:
PU_framework_dcp.php:15
Dcp\Pu\TestSuiteDcp\$allInProgress
static $allInProgress
Definition:
PU_dcp.php:21
print
print
Definition:
checklist.php:49
Dcp\Pu\SuiteDcpSecurity\suite
static suite()
Definition:
PU_suite_dcp_security.php:11
Dcp\Pu\TestSuiteDcp\msgFile
const msgFile
Definition:
PU_dcp.php:20
Dcp\Pu\SuiteDcpAttribute\suite
static suite()
Definition:
PU_suite_dcp_attribute.php:16
← centre documentaire
© anakeen