13 require_once(dirname(__FILE__) .
'/../common-dir.php');
21 protected function setUp() :
void
40 print
"Starting unit test for common-dir.php\n";
41 print
"test function Isdir()\n";
43 $result =
Isdir($mode);
44 $this->assertEquals(
true, $result);
46 $result =
Isdir($mode);
47 $this->assertEquals(
false, $result);
48 print
"test function Isartifact()\n";
51 $this->assertEquals(
false, $result);
54 $this->assertEquals(
true, $result);
55 print
"test function Iscontainer()\n";
58 $this->assertEquals(
true, $result);
61 $this->assertEquals(
true, $result);
63 print
"test function DirMode2String()\n";
65 $this->assertEquals(
"a-d-----S---", $result);
73 $this->assertEquals(
GetFileExt(
'autodestroy.exe.bak'),
'bak');
83 $this->assertEquals(
"a-d-----S---", $result);
85 $this->assertEquals(
"---rw-r--r--", $result);
test_GetFileExt()
test of ExtensionGetter
test_DirMode2String()
test for DirMode2String
test_Is()
test for Isdir Isartifact Iscontainer
DirMode2String($Mode)
Convert a file mode to string values.
GetFileExt($fname)
Get File Extension (text after last period)