Skip to content

Commit

Permalink
Fix for generate:controller. See #3998 (#3999)
Browse files Browse the repository at this point in the history
  • Loading branch information
reganking authored and LOBsTerr committed Feb 12, 2019
1 parent 3051dbb commit 4321d51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Extension/Extension.php
Expand Up @@ -134,12 +134,13 @@ public function getTemplatePath($fullPath = false)
}

/**
* @param string $testType
* @param bool $fullPath
* @return string
*/
public function getTestsPath($fullPath = false)
public function getTestsPath($testType, $fullPath = false)
{
return $this->getPath($fullPath) . '/tests';
return $this->getPath($fullPath) . '/tests/' . $testType;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Generator/ControllerGenerator.php
Expand Up @@ -54,7 +54,7 @@ public function generate(array $parameters)
if ($test) {
$this->renderFile(
'module/Tests/Controller/controller.php.twig',
$moduleInstance->getTestPath('Controller') . '/' . $class . 'Test.php',
$moduleInstance->getTestsPath('Controller') . '/' . $class . 'Test.php',
$parameters
);
}
Expand Down

0 comments on commit 4321d51

Please sign in to comment.