Skip to content
Browse files

Merge pull request #584 from shama/patch-inpath-test

Add test/doc for reverse Folder::inPath()
  • Loading branch information...
2 parents c1531d3 + deb5a57 commit 0443fe150715db22a7b021ffa154b0b625276715 @markstory markstory committed
Showing with 4 additions and 1 deletion.
  1. +3 −0 lib/Cake/Test/Case/Utility/FolderTest.php
  2. +1 −1 lib/Cake/Utility/Folder.php
View
3 lib/Cake/Test/Case/Utility/FolderTest.php
@@ -122,6 +122,9 @@ public function testInPath() {
$result = $Folder->inPath(DS . 'non-existing' . $inside);
$this->assertFalse($result);
+
+ $result = $Folder->inPath($path . DS . 'Model', true);
+ $this->assertTrue($result);
}
/**
View
2 lib/Cake/Utility/Folder.php
@@ -322,7 +322,7 @@ public function inCakePath($path = '') {
* Returns true if the File is in given path.
*
* @param string $path The path to check that the current pwd() resides with in.
- * @param boolean $reverse
+ * @param boolean $reverse Reverse the search, check that pwd() resides within $path.
* @return boolean
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#Folder::inPath
*/

0 comments on commit 0443fe1

Please sign in to comment.
Something went wrong with that request. Please try again.