Example #1
0
 /**
  * @param string $controller
  *
  * @return string
  */
 private function buildController($controller)
 {
     $controller = ClassHelper::pathToNamespace(ClassHelper::snakeToCamel($controller));
     $controllerClassString = ($this->extendByParentNamespace ? $controller : '') . self::CONTROLLER_CLASS;
     $controllerClassString = $controller . '\\' . $controllerClassString;
     return $controllerClassString;
 }
 /**
  * @param $string
  * @param $excepted
  * @dataProvider dataProviderPathToNamespace
  */
 public function testPathToNamespace($string, $excepted)
 {
     $this->assertEquals($excepted, ClassHelper::pathToNamespace($string));
 }