mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding tests for creating directories with trailing slashes. Closes #520
This commit is contained in:
parent
5b1e9f6f5f
commit
176c12e5fe
1 changed files with 17 additions and 0 deletions
|
@ -99,6 +99,23 @@ class FolderTest extends CakeTestCase {
|
|||
$this->assertTrue($result);
|
||||
rmdir(TMP . 'tests' . DS . 'first');
|
||||
}
|
||||
|
||||
/**
|
||||
* test that creation of folders with trailing ds works
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function testCreateWithTrailingDs() {
|
||||
$folder =& new Folder(TMP);
|
||||
$path = TMP . 'tests' . DS . 'trailing' . DS . 'dir' . DS;
|
||||
$folder->create($path);
|
||||
|
||||
$this->assertTrue(is_dir($path), 'Folder was not made');
|
||||
|
||||
$folder =& new Folder(TMP . 'tests' . DS . 'trailing');
|
||||
$this->assertTrue($folder->delete());
|
||||
}
|
||||
|
||||
/**
|
||||
* test recurisve directory create failure.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue