| @@ 136-154 (lines=19) @@ | ||
| 133 | )); |
|
| 134 | } |
|
| 135 | ||
| 136 | protected function generateTestClass() |
|
| 137 | { |
|
| 138 | $parts = explode('\\', $this->entity); |
|
| 139 | $entityClass = array_pop($parts); |
|
| 140 | ||
| 141 | $dir = sprintf('%s/../tests/%s/Controller/', $this->rootDir, $this->bundle->getName()); |
|
| 142 | ||
| 143 | $target = $dir . $entityClass . 'ControllerTest.php'; |
|
| 144 | ||
| 145 | ||
| 146 | $this->processRenderFile( |
|
| 147 | 'crud/tests/controllerTest.php.twig', |
|
| 148 | $target, |
|
| 149 | sprintf('%sControllerTest', $entityClass), |
|
| 150 | $entityClass, |
|
| 151 | 'Controller', |
|
| 152 | null |
|
| 153 | ); |
|
| 154 | } |
|
| 155 | ||
| 156 | /** |
|
| 157 | * @param $file |
|
| @@ 137-155 (lines=19) @@ | ||
| 134 | ); |
|
| 135 | } |
|
| 136 | ||
| 137 | protected function generateTestClass() |
|
| 138 | { |
|
| 139 | $parts = explode('\\', $this->entity); |
|
| 140 | $entityClass = array_pop($parts); |
|
| 141 | ||
| 142 | $dir = sprintf('%s/../tests/%s/Model/', $this->rootDir, $this->bundle->getName()); |
|
| 143 | ||
| 144 | $target = $dir . $entityClass . 'RepositoryTest.php'; |
|
| 145 | ||
| 146 | ||
| 147 | $this->processRenderFile( |
|
| 148 | 'crud/tests/repositoryTest.php.twig', |
|
| 149 | $target, |
|
| 150 | sprintf('%sRepositoryTest', $entityClass), |
|
| 151 | $entityClass, |
|
| 152 | 'Model', |
|
| 153 | null |
|
| 154 | ); |
|
| 155 | } |
|
| 156 | ||
| 157 | /** |
|
| 158 | * @param $file |
|