Skip to content

Commit 23ab845

Browse files
committed
Adding discrete tests to Folder::addPathElement
1 parent 00d7c65 commit 23ab845

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cake/tests/cases/libs/folder.test.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,18 @@ function testZeroAsDirectory() {
215215
$result = $Folder->delete($new);
216216
$this->assertTrue($result);
217217
}
218+
/**
219+
* test Adding path elements to a path
220+
*
221+
* @return void
222+
**/
223+
function testAddPathElement() {
224+
$result = Folder::addPathElement(DS . 'some' . DS . 'dir', 'another_path');
225+
$this->assertEqual($result, DS . 'some' . DS . 'dir' . DS . 'another_path');
226+
227+
$result = Folder::addPathElement(DS . 'some' . DS . 'dir' . DS, 'another_path');
228+
$this->assertEqual($result, DS . 'some' . DS . 'dir' . DS . 'another_path');
229+
}
218230
/**
219231
* testFolderRead method
220232
*

0 commit comments

Comments
 (0)