From deb5a57cb9f56b9bf6e4cea1d1e8ade2afabfefc Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Tue, 27 Mar 2012 11:55:13 -0700 Subject: [PATCH] Add test/doc for reverse Folder::inPath() --- lib/Cake/Test/Case/Utility/FolderTest.php | 3 +++ lib/Cake/Utility/Folder.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Test/Case/Utility/FolderTest.php b/lib/Cake/Test/Case/Utility/FolderTest.php index 22c5d6ea3..1cc2230a1 100644 --- a/lib/Cake/Test/Case/Utility/FolderTest.php +++ b/lib/Cake/Test/Case/Utility/FolderTest.php @@ -122,6 +122,9 @@ class FolderTest extends CakeTestCase { $result = $Folder->inPath(DS . 'non-existing' . $inside); $this->assertFalse($result); + + $result = $Folder->inPath($path . DS . 'Model', true); + $this->assertTrue($result); } /** diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index ad0863c37..d00f62fe5 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -322,7 +322,7 @@ class Folder { * 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 */