Updating folder + test case to reflect api changes.

This commit is contained in:
mark_story 2009-08-31 22:47:37 -04:00
parent 5fa6e5b6f2
commit fe3514371f
2 changed files with 6 additions and 6 deletions

View file

@ -627,7 +627,7 @@ class Folder extends Object {
} }
if (!is_dir($toDir)) { if (!is_dir($toDir)) {
$this->mkdir($toDir, $mode); $this->create($toDir, $mode);
} }
if (!is_writable($toDir)) { if (!is_writable($toDir)) {

View file

@ -110,7 +110,7 @@ class FolderTest extends CakeTestCase {
$this->assertTrue($result); $this->assertTrue($result);
$copy = TMP . 'test_folder_copy'; $copy = TMP . 'test_folder_copy';
$result = $Folder->cp($copy); $result = $Folder->copy($copy);
$this->assertTrue($result); $this->assertTrue($result);
$copy = TMP . 'test_folder_copy'; $copy = TMP . 'test_folder_copy';
@ -125,7 +125,7 @@ class FolderTest extends CakeTestCase {
$this->assertTrue($result); $this->assertTrue($result);
$mv = TMP . 'test_folder_mv_2'; $mv = TMP . 'test_folder_mv_2';
$result = $Folder->mv($mv); $result = $Folder->move($mv);
$this->assertTrue($result); $this->assertTrue($result);
$result = $Folder->delete($new); $result = $Folder->delete($new);
@ -134,7 +134,7 @@ class FolderTest extends CakeTestCase {
$result = $Folder->delete($mv); $result = $Folder->delete($mv);
$this->assertTrue($result); $this->assertTrue($result);
$result = $Folder->rm($mv); $result = $Folder->delete($mv);
$this->assertTrue($result); $this->assertTrue($result);
$new = APP . 'index.php'; $new = APP . 'index.php';
@ -452,7 +452,7 @@ class FolderTest extends CakeTestCase {
$Folder->cd(TMP); $Folder->cd(TMP);
$file = new File($Folder->pwd() . DS . 'paths.php', true); $file = new File($Folder->pwd() . DS . 'paths.php', true);
$Folder->mkdir($Folder->pwd() . DS . 'testme'); $Folder->create($Folder->pwd() . DS . 'testme');
$Folder->cd('testme'); $Folder->cd('testme');
$result = $Folder->find('paths\.php'); $result = $Folder->find('paths\.php');
$expected = array(); $expected = array();
@ -493,7 +493,7 @@ class FolderTest extends CakeTestCase {
$this->assertIdentical($result, $expected); $this->assertIdentical($result, $expected);
$Folder->cd(TMP); $Folder->cd(TMP);
$Folder->mkdir($Folder->pwd() . DS . 'testme'); $Folder->create($Folder->pwd() . DS . 'testme');
$Folder->cd('testme'); $Folder->cd('testme');
$File =& new File($Folder->pwd() . DS . 'paths.php'); $File =& new File($Folder->pwd() . DS . 'paths.php');
$File->create(); $File->create();