Core  3.2
PHP API documentation
 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 
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 }
static getCommonImportFile()
new_Doc($dbaccess, $id= '', $latest=false)
$dir
Definition: resizeimg.php:144
if($file) if($subject==""&&$file) if($subject=="") $err
← centre documentaire © anakeen