Adding test folder structure to PluginTask creation

This commit is contained in:
mark_story 2009-06-10 22:22:06 -04:00
parent 5eae9fcba5
commit 8ca30f2d22
2 changed files with 7 additions and 1 deletions

View file

@ -136,7 +136,9 @@ class PluginTask extends Shell {
$verbose = $this->in(__('Do you want verbose output?', true), array('y', 'n'), 'n'); $verbose = $this->in(__('Do you want verbose output?', true), array('y', 'n'), 'n');
$Folder = new Folder($this->path . $pluginPath); $Folder = new Folder($this->path . $pluginPath);
$directories = array('models' . DS . 'behaviors', 'controllers' . DS . 'components', 'views' . DS . 'helpers'); $directories = array('models' . DS . 'behaviors', 'controllers' . DS . 'components',
'views' . DS . 'helpers', 'tests' . DS . 'cases', 'tests' . DS . 'groups',
'tests' . DS . 'fixtures');
foreach ($directories as $directory) { foreach ($directories as $directory) {
$Folder->create($this->path . $pluginPath . DS . $directory); $Folder->create($this->path . $pluginPath . DS . $directory);

View file

@ -100,6 +100,10 @@ class PluginTaskTest extends CakeTestCase {
$this->assertTrue(is_dir($path . DS . 'models'), 'No models dir %s'); $this->assertTrue(is_dir($path . DS . 'models'), 'No models dir %s');
$this->assertTrue(is_dir($path . DS . 'views'), 'No views dir %s'); $this->assertTrue(is_dir($path . DS . 'views'), 'No views dir %s');
$this->assertTrue(is_dir($path . DS . 'views' . DS . 'helpers'), 'No helpers dir %s'); $this->assertTrue(is_dir($path . DS . 'views' . DS . 'helpers'), 'No helpers dir %s');
$this->assertTrue(is_dir($path . DS . 'tests'), 'No tests dir %s');
$this->assertTrue(is_dir($path . DS . 'tests' . DS . 'cases'), 'No cases dir %s');
$this->assertTrue(is_dir($path . DS . 'tests' . DS . 'groups'), 'No groups dir %s');
$this->assertTrue(is_dir($path . DS . 'tests' . DS . 'fixtures'), 'No fixtures dir %s');
$file = $path . DS . 'bake_test_plugin_app_controller.php'; $file = $path . DS . 'bake_test_plugin_app_controller.php';
$this->Task->expectAt(0, 'createFile', array($file, '*'), 'No AppController %s'); $this->Task->expectAt(0, 'createFile', array($file, '*'), 'No AppController %s');