mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding test folder structure to PluginTask creation
This commit is contained in:
parent
5eae9fcba5
commit
8ca30f2d22
2 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||||
|
|
|
@ -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');
|
||||||
|
|
Loading…
Add table
Reference in a new issue