Example #1
0
 public function testGetControllerClassName()
 {
     $this->assertEquals('Mage_Core_IndexController', $this->_model->getControllerClassName('Mage_Core', 'index'));
 }
Example #2
0
 /**
  * Build controller class name based on moduleName and controllerName
  *
  * @param string $realModule
  * @param string $controller
  * @return string
  */
 public function getControllerClassName($realModule, $controller)
 {
     /**
      * Start temporary block
      * TODO: Sprint#27. Delete after adminhtml refactoring
      */
     if ($realModule == 'Mage_Adminhtml') {
         return parent::getControllerClassName($realModule, $controller);
     }
     /**
      * End temporary block
      */
     $parts = explode('_', $realModule);
     $realModule = implode('_', array_splice($parts, 0, 2));
     return $realModule . '_' . ucfirst($this->_areaCode) . '_' . uc_words($controller) . 'Controller';
 }