Skip to content

Commit

Permalink
Add test/doc for reverse Folder::inPath()
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Mar 27, 2012
1 parent 6ad3bd4 commit deb5a57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/Cake/Test/Case/Utility/FolderTest.php
Expand Up @@ -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);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Folder.php
Expand Up @@ -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
*/
Expand Down

0 comments on commit deb5a57

Please sign in to comment.