Skip to content

Commit

Permalink
Updating folder + test case to reflect api changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Sep 1, 2009
1 parent 5fa6e5b commit fe35143
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cake/libs/folder.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ function copy($options = array()) {
}

if (!is_dir($toDir)) {
$this->mkdir($toDir, $mode);
$this->create($toDir, $mode);
}

if (!is_writable($toDir)) {
Expand Down
10 changes: 5 additions & 5 deletions cake/tests/cases/libs/folder.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function testOperations() {
$this->assertTrue($result);

$copy = TMP . 'test_folder_copy';
$result = $Folder->cp($copy);
$result = $Folder->copy($copy);
$this->assertTrue($result);

$copy = TMP . 'test_folder_copy';
Expand All @@ -125,7 +125,7 @@ function testOperations() {
$this->assertTrue($result);

$mv = TMP . 'test_folder_mv_2';
$result = $Folder->mv($mv);
$result = $Folder->move($mv);
$this->assertTrue($result);

$result = $Folder->delete($new);
Expand All @@ -134,7 +134,7 @@ function testOperations() {
$result = $Folder->delete($mv);
$this->assertTrue($result);

$result = $Folder->rm($mv);
$result = $Folder->delete($mv);
$this->assertTrue($result);

$new = APP . 'index.php';
Expand Down Expand Up @@ -452,7 +452,7 @@ function testFind() {

$Folder->cd(TMP);
$file = new File($Folder->pwd() . DS . 'paths.php', true);
$Folder->mkdir($Folder->pwd() . DS . 'testme');
$Folder->create($Folder->pwd() . DS . 'testme');
$Folder->cd('testme');
$result = $Folder->find('paths\.php');
$expected = array();
Expand Down Expand Up @@ -493,7 +493,7 @@ function testFindRecursive() {
$this->assertIdentical($result, $expected);

$Folder->cd(TMP);
$Folder->mkdir($Folder->pwd() . DS . 'testme');
$Folder->create($Folder->pwd() . DS . 'testme');
$Folder->cd('testme');
$File =& new File($Folder->pwd() . DS . 'paths.php');
$File->create();
Expand Down

0 comments on commit fe35143

Please sign in to comment.