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_test_dcp_dir.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
'PU_testcase_dcp_commonfamily.php'
;
13
14
class
TestDir
extends
TestCaseDcpCommonFamily
15
{
16
protected
static
function
getCommonImportFile
()
17
{
18
return
array(
19
'PU_data_dcp_dir.ods'
20
);
21
}
22
23
/**
24
* @param $dirId
25
* @dataProvider dataClearDir
26
*/
27
public
function
testClearDir($dirId)
28
{
29
/**
30
* @var \Dcp\Family\Dir $dir
31
*/
32
$dir
=
new_Doc
(
''
, $dirId,
true
);
33
$this->assertTrue(
$dir
->isAlive() , sprintf(
"Could not get dir with id '%s'."
, $dirId));
34
$err
=
$dir
->Clear();
35
$this->assertEmpty($err, sprintf(
"Clear() on dir with id '%s' returned unexpected error message: %s"
, $dirId, $err));
36
$content =
$dir
->getContent(
false
);
37
$this->assertCount(0, $content, sprintf(
"Unexpected content's count (%s) for dir with id '%s'."
, count($content), $dirId));
38
}
39
40
public
function
dataClearDir
()
41
{
42
return
array(
43
array(
44
'DIR_FOO'
45
)
46
);
47
}
48
}
Dcp\Pu\TestCaseDcpCommonFamily
Definition:
PU_testcase_dcp_commonfamily.php:15
Dcp\Pu\TestDir\dataClearDir
dataClearDir()
Definition:
PU_test_dcp_dir.php:40
Dcp\Pu\TestDir
Definition:
PU_test_dcp_dir.php:14
Dcp\Pu\TestDir\getCommonImportFile
static getCommonImportFile()
Definition:
PU_test_dcp_dir.php:16
new_Doc
new_Doc($dbaccess, $id= '', $latest=false)
Definition:
freedom_util.php:119
$dir
$dir
Definition:
resizeimg.php:144
$err
if($file) if($subject==""&&$file) if($subject=="") $err
Definition:
fdl_sendmail.php:78
← centre documentaire
© anakeen