create test for module:generate command
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
@@ -17,7 +17,7 @@
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
namespace Thelia\Command;
|
||||
@@ -109,6 +109,9 @@ class ModuleGenerateCommand extends ContainerAwareCommand {
|
||||
|
||||
private function formatModuleName($name)
|
||||
{
|
||||
if (in_array(strtolower($name), $this->reservedKeyWords)) {
|
||||
throw new \RuntimeException(sprintf("%s module name is a reserved keyword", $name));
|
||||
}
|
||||
return ucfirst($name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user