| @@ 50-59 (lines=10) @@ | ||
| 47 | /** |
|
| 48 | * Generates skeleton class for fake. |
|
| 49 | */ |
|
| 50 | public function actionGenfake($file) |
|
| 51 | { |
|
| 52 | $path = $this->buildFakePath($file); |
|
| 53 | if (!$this->force && file_exists($path)) { |
|
| 54 | Yii::warning("already exists: $path"); |
|
| 55 | ||
| 56 | return 1; |
|
| 57 | } |
|
| 58 | ||
| 59 | return $this->genFake($file, $path); |
|
| 60 | } |
|
| 61 | ||
| 62 | protected function genFake($file, $path) |
|
| @@ 75-84 (lines=10) @@ | ||
| 72 | /** |
|
| 73 | * Generates skeleton class for test. |
|
| 74 | */ |
|
| 75 | public function actionGentest($file) |
|
| 76 | { |
|
| 77 | $path = $this->buildTestPath($file); |
|
| 78 | if (!$this->force && file_exists($path)) { |
|
| 79 | Yii::warning("already exists: $path"); |
|
| 80 | ||
| 81 | return 1; |
|
| 82 | } |
|
| 83 | ||
| 84 | return $this->genSkel($file); |
|
| 85 | } |
|
| 86 | ||
| 87 | protected static function prepareFile($file) |
|