Skip to content
Permalink
Browse files

Adding test folder structure to PluginTask creation

  • Loading branch information...
markstory committed Jun 11, 2009
1 parent 5eae9fc commit 8ca30f2d22becccbdc1238d2c3e852cf3ee451c4
Showing with 7 additions and 1 deletion.
  1. +3 −1 cake/console/libs/tasks/plugin.php
  2. +4 −0 cake/tests/cases/console/libs/tasks/plugin.test.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);
@@ -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');

0 comments on commit 8ca30f2

Please sign in to comment.
You can’t perform that action at this time.