Skip to content
Permalink
Browse files

Adding fixture baking in when model is baked.

  • Loading branch information...
markstory committed Jul 16, 2009
1 parent 08ce38c commit a7fb5f96e91bc96d1bc3737c5ec5edebdbc3ad87
Showing with 5 additions and 4 deletions.
  1. +5 −4 cake/console/libs/bake.php
@@ -136,15 +136,15 @@ function all() {
$this->connection = $this->DbConfig->getConfig();
}
if (empty($this->args)) {
$name = $this->Model->getName($this->connection);
}
foreach (array('Model', 'Controller', 'View') as $task) {
$this->{$task}->connection = $this->connection;
$this->{$task}->interactive = false;
}
if (empty($this->args)) {
$name = $this->Model->getName($this->connection);
}
if (!empty($this->args[0])) {
$name = $this->args[0];
}
@@ -164,6 +164,7 @@ function all() {
if ($modelBaked && $modelExists === false) {
$this->out(sprintf(__('%s Model was baked.', true), $model));
if ($this->_checkUnitTest()) {
$this->Model->bakeFixture($model);
$this->Model->bakeTest($model);
}
$modelExists = true;

0 comments on commit a7fb5f9

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