Permalink
Browse files

Adding discrete tests to Folder::addPathElement

  • Loading branch information...
1 parent 00d7c65 commit 23ab84596aa2083acea08d7b33e275f4322b7f2b @markstory markstory committed Oct 28, 2009
Showing with 12 additions and 0 deletions.
  1. +12 −0 cake/tests/cases/libs/folder.test.php
@@ -215,6 +215,18 @@ function testZeroAsDirectory() {
$result = $Folder->delete($new);
$this->assertTrue($result);
}
+/**
+ * test Adding path elements to a path
+ *
+ * @return void
+ **/
+ function testAddPathElement() {
+ $result = Folder::addPathElement(DS . 'some' . DS . 'dir', 'another_path');
+ $this->assertEqual($result, DS . 'some' . DS . 'dir' . DS . 'another_path');
+
+ $result = Folder::addPathElement(DS . 'some' . DS . 'dir' . DS, 'another_path');
+ $this->assertEqual($result, DS . 'some' . DS . 'dir' . DS . 'another_path');
+ }
/**
* testFolderRead method
*

0 comments on commit 23ab845

Please sign in to comment.