Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

This will be implemented in the Folder class itself

Revert "preventing the possibility of trying to delete / if the test dir wasn't created correctly"

This reverts commit 61c9771.
  • Loading branch information...
commit 6d6f97de591860aa618c69084d28b7534d892153 1 parent 77f371d
@AD7six AD7six authored
Showing with 8 additions and 21 deletions.
  1. +8 −21 cake/tests/cases/console/libs/tasks/plugin.test.php
View
29 cake/tests/cases/console/libs/tasks/plugin.test.php
@@ -38,6 +38,7 @@
require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'plugin.php';
require_once CAKE . 'console' . DS . 'libs' . DS . 'tasks' . DS . 'model.php';
+
Mock::generatePartial(
'ShellDispatcher', 'TestPluginTaskMockShellDispatcher',
array('getInput', 'stdout', 'stderr', '_stop', '_initEnvironment')
@@ -187,7 +188,8 @@ function testBakeFoldersAndFiles() {
$file = $path . DS . 'bake_test_plugin_app_model.php';
$this->Task->expectAt(1, 'createFile', array($file, '*'), 'No AppModel %s');
- $this->_rmDir($this->Task->path . 'bake_test_plugin');
+ $Folder =& new Folder($this->Task->path . 'bake_test_plugin');
+ $Folder->delete();
}
/**
@@ -211,7 +213,8 @@ function testExecuteWithNoArgs() {
$this->Task->args = array();
$this->Task->execute();
- $this->_rmDir($path);
+ $Folder =& new Folder($path);
+ $Folder->delete();
}
/**
@@ -234,7 +237,8 @@ function testExecuteWithOneArg() {
$this->Task->execute();
- $this->_rmDir($this->Task->path . 'bake_test_plugin');
+ $Folder =& new Folder($this->Task->path . 'bake_test_plugin');
+ $Folder->delete();
}
/**
@@ -255,24 +259,7 @@ function testExecuteWithTwoArgs() {
$this->Task->Model->expectOnce('loadTasks');
$this->Task->Model->expectOnce('execute');
$this->Task->execute();
-
- $this->_rmDir($this->Task->path . 'bake_test_plugin');
- }
-
-/**
- * rmDir method
- *
- * If the folder exists - delete it
- *
- * @param mixed $path
- * @return void
- * @access protected
- */
- function _rmDir($path) {
- if (is_dir($path)) {
- $Folder =& new Folder($path);
- $Folder->delete();
- }
+ $Folder->delete();
}
}
?>
Please sign in to comment.
Something went wrong with that request. Please try again.