From 8ca30f2d22becccbdc1238d2c3e852cf3ee451c4 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 10 Jun 2009 22:22:06 -0400 Subject: [PATCH] Adding test folder structure to PluginTask creation --- cake/console/libs/tasks/plugin.php | 4 +++- cake/tests/cases/console/libs/tasks/plugin.test.php | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cake/console/libs/tasks/plugin.php b/cake/console/libs/tasks/plugin.php index 187b12971..db9c7bf75 100644 --- a/cake/console/libs/tasks/plugin.php +++ b/cake/console/libs/tasks/plugin.php @@ -136,7 +136,9 @@ class PluginTask extends Shell { $verbose = $this->in(__('Do you want verbose output?', true), array('y', 'n'), 'n'); $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) { $Folder->create($this->path . $pluginPath . DS . $directory); diff --git a/cake/tests/cases/console/libs/tasks/plugin.test.php b/cake/tests/cases/console/libs/tasks/plugin.test.php index 8b10d109e..feb11d965 100644 --- a/cake/tests/cases/console/libs/tasks/plugin.test.php +++ b/cake/tests/cases/console/libs/tasks/plugin.test.php @@ -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 . 'views'), 'No views 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'; $this->Task->expectAt(0, 'createFile', array($file, '*'), 'No AppController %s');