Code
- #
- # Running unit tests from Test::iMSCP::Rights package...
- #
- # Subtest: Test::iMSCP::Rights unit tests
- 1..14
- ok 1 - require iMSCP::Rights;
- ok 2 - iMSCP::Rights::setRights() die on missing option
- ok 3 - iMSCP::Rights::setRights() die on unallowed mixed options
- ok 4 - iMSCP::Rights() die on inexistent target
- ok 5 - iMSCP::Rights::setRights() die on inexistent user
- ok 6 - iMSCP::Rights::setRights() die on inexistent group
- ok 7 - iMSCP::Rights::setRights() set expected mode
- ok 8 - iMSCP::Rights::setRights() set exepcted mode recursively
- ok 9 - iMSCP::Rights::setRights() set expected dirmode
- ok 10 - iMSCP::Rights::setRights() set expected filemode
- ok 11 - iMSCP::Rights::setRights() set expected user
- ok 12 - iMSCP::Rights::setRights() set expected user recursively
- ok 13 - iMSCP::Rights::setRights() set expected group
- ok 14 - iMSCP::Rights::setRights() set expected group recursively
- ok 1 - Test::iMSCP::Rights unit tests
- #
- # Running unit tests from Test::iMSCP::Dir package...
- #
- # Subtest: Test::iMSCP::Dir unit tests
- 1..42
- ok 1 - require iMSCP::Dir;
- ok 2 - 'iMSCP::Dir::new()' isa 'iMSCP::Dir'
- ok 3 - iMSCP::Dir::new() die on missing dirname option
- ok 4 - iMSCP::Dir::mode() die on missing mode parameter
- ok 5 - iMSCP::Dir::mode() die on inexistent dirname
- ok 6 - iMSCP::Dir::mode() set expected mode on dirname
- ok 7 - iMSCP::Dir::owner() die on missing owner parameter
- ok 8 - iMSCP::Dir::owner() die on missing group parameter
- ok 9 - iMSCP::Dir::owner() die on inexistent user
- ok 10 - iMSCP::Dir::owner() die on inexistent group
- ok 11 - iMSCP::Dir::owner() set expected owner and group on dirname
- ok 12 - iMSCP::Dir::getFiles() die if cannot open dirname
- ok 13 - iMSCP::Dir::getFiles() return expected filenames
- ok 14 - iMSCP::Dir::getFiles() return expected filtered file type
- ok 15 - iMSCP::Dir::getDirs() die if cannot open dirname
- ok 16 - iMSCP::Dir::getDirs() return expected dirnames
- ok 17 - iMSCP::Dir::getAll() die if cannot open dirname
- ok 18 - iMSCP::Dir::getAll() return expected dirnames and filenames
- ok 19 - iMSCP::Dir::isEmpty() die if cannot open dirname
- ok 20 - iMSCP::Dir::isEmpty() return true if dirname is empty
- ok 21 - iMSCP::Dir::isEmpty() return false if dirname is not empty
- ok 22 - iMSCP::Dir::make() die if dirname already exists as file
- ok 23 - iMSCP::Dir::make() can create dirname
- ok 24 - iMSCP::Dir::make() can create dirpath
- ok 25 - iMSCP::Dir::make() set expected owner on newly created dirname
- ok 26 - iMSCP::Dir::make() set expected group on newly created dirname
- ok 27 - iMSCP::Dir::make() set expected mode on newly created dirname
- ok 28 - iMSCP::Dir::make() set expected owner on existent dirname
- ok 29 - iMSCP::Dir::Make() set expected group on existent dirname
- ok 30 - iMSCP::Dir::make() set expected mode on existent dirname
- ok 31 - iMSCP::Dir::remove() can remove dirname
- ok 32 - iMSCP::Dir::remove() can remove dirpath
- ok 33 - iMSCP::Dir::rcopy() die on missing destdir parameter
- ok 34 - iMSCP::Dir::rcopy() die if cannot open dirname
- ok 35 - iMSCP::Dir::rcopy() die if destdir do not exists
- ok 36 - iMSCP::Dir::rcopy() can copy dirname to destdir
- ok 37 - iMSCP::Dir::rcopy can copy dirname to destdir with preserve option
- ok 38 - iMSCP::Dir::rcopy() preserve file attributes
- ok 39 - iMSCP::Dir::rcopy() do not preserve file attributes
- ok 40 - iMSCP::Dir::moveDir() die on missing destdir parameter
- ok 41 - iMSCP::Dir::moveDir() die on inexistent dirname
- ok 42 - iMSCP::Dir::moveDir() can move dirname to destdir
- ok 2 - Test::iMSCP::Dir unit tests
- 1..2