mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
updating bake test file generation
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5963 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
90d6659918
commit
05a5aa3bc7
2 changed files with 7 additions and 14 deletions
|
@ -75,10 +75,13 @@ class ControllerTask extends Shell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$baked = $this->__bake($controller, $actions);
|
if ($this->__bake($controller, $actions)) {
|
||||||
|
if ($this->_checkUnitTest()) {
|
||||||
$this->__bakeTest($controller);
|
$this->__bakeTest($controller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Interactive
|
* Interactive
|
||||||
*
|
*
|
||||||
|
@ -472,13 +475,8 @@ class ControllerTask extends Shell {
|
||||||
$filename = Inflector::underscore($className).'_controller.test.php';
|
$filename = Inflector::underscore($className).'_controller.test.php';
|
||||||
|
|
||||||
$this->out("Baking unit test for $className...");
|
$this->out("Baking unit test for $className...");
|
||||||
$Folder =& new Folder($path, true);
|
|
||||||
if ($path = $Folder->cd($path)) {
|
|
||||||
$path = $Folder->slashTerm($path);
|
|
||||||
return $this->createFile($path . $filename, $out);
|
return $this->createFile($path . $filename, $out);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Outputs and gets the list of possible models or controllers from database
|
* Outputs and gets the list of possible models or controllers from database
|
||||||
*
|
*
|
||||||
|
|
|
@ -591,13 +591,8 @@ class ModelTask extends Shell {
|
||||||
$filename = Inflector::underscore($className).'.test.php';
|
$filename = Inflector::underscore($className).'.test.php';
|
||||||
|
|
||||||
$this->out("Baking unit test for $className...");
|
$this->out("Baking unit test for $className...");
|
||||||
$Folder =& new Folder($path, true);
|
|
||||||
if ($path = $Folder->cd($path)) {
|
|
||||||
$path = $Folder->slashTerm($path);
|
|
||||||
return $this->createFile($path . $filename, $out);
|
return $this->createFile($path . $filename, $out);
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* outputs the a list of possible models or controllers from database
|
* outputs the a list of possible models or controllers from database
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue