Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding test folder structure to PluginTask creation

  • Loading branch information...
commit 8ca30f2d22becccbdc1238d2c3e852cf3ee451c4 1 parent 5eae9fc
@markstory markstory authored
View
4 cake/console/libs/tasks/plugin.php
@@ -136,7 +136,9 @@ function bake($plugin) {
$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);
View
4 cake/tests/cases/console/libs/tasks/plugin.test.php
@@ -100,6 +100,10 @@ function testBakeFoldersAndFiles() {
$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');
Please sign in to comment.
Something went wrong with that request. Please try again.