/** * @param \Magento\Framework\App\Router\ActionList $actionList * @param \Magento\Framework\App\ActionFactory $actionFactory * @param \Magento\Framework\App\DefaultPathInterface $defaultPath * @param \Magento\Framework\App\ResponseFactory $responseFactory * @param \Magento\Framework\App\Route\ConfigInterface $routeConfig * @param \Magento\Framework\UrlInterface $url * @param \Magento\Framework\StoreManagerInterface $storeManager * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo * @param string $routerId * @param \Magento\Framework\Code\NameBuilder $nameBuilder * @param \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig * @param \Magento\Backend\App\ConfigInterface $backendConfig * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct(\Magento\Framework\App\Router\ActionList $actionList, \Magento\Framework\App\ActionFactory $actionFactory, \Magento\Framework\App\DefaultPathInterface $defaultPath, \Magento\Framework\App\ResponseFactory $responseFactory, \Magento\Framework\App\Route\ConfigInterface $routeConfig, \Magento\Framework\UrlInterface $url, \Magento\Framework\StoreManagerInterface $storeManager, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo, $routerId, \Magento\Framework\Code\NameBuilder $nameBuilder, \Magento\Framework\App\Config\ScopeConfigInterface $coreConfig, \Magento\Backend\App\ConfigInterface $backendConfig) { parent::__construct($actionList, $actionFactory, $defaultPath, $responseFactory, $routeConfig, $url, $storeManager, $scopeConfig, $urlSecurityInfo, $routerId, $nameBuilder); $this->_coreConfig = $coreConfig; $this->_backendConfig = $backendConfig; $this->_url = $url; }
public function testGetActionClassName() { $className = 'name of class'; $module = 'module'; $prefix = 'Controller'; $actionPath = 'action path'; $this->nameBuilderMock->expects($this->once())->method('buildClassName')->with([$module, $prefix, $actionPath])->willReturn($className); $this->assertEquals($className, $this->model->getActionClassName($module, $actionPath)); }
/** * @param \Magento\Framework\App\Router\ActionList $actionList * @param \Magento\Framework\App\ActionFactory $actionFactory * @param \Magento\Framework\App\DefaultPathInterface $defaultPath * @param \Magento\Framework\App\ResponseFactory $responseFactory * @param \Magento\Framework\App\Route\Config $routeConfig * @param \Magento\Framework\UrlInterface $url * @param \Magento\Framework\StoreManagerInterface $storeManager * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo * @param string $routerId * @param \Magento\Framework\Code\NameBuilder $nameBuilder * @param \Magento\Framework\App\RouterListInterface $routerList * @param \Magento\UrlRewrite\App\Request\RewriteService $urlRewriteService * @param \Magento\DesignEditor\Helper\Data $designEditorHelper * @param \Magento\DesignEditor\Model\State $designEditorState * @param \Magento\Backend\Model\Auth\Session $session * * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct(\Magento\Framework\App\Router\ActionList $actionList, \Magento\Framework\App\ActionFactory $actionFactory, \Magento\Framework\App\DefaultPathInterface $defaultPath, \Magento\Framework\App\ResponseFactory $responseFactory, \Magento\Framework\App\Route\Config $routeConfig, \Magento\Framework\UrlInterface $url, \Magento\Framework\StoreManagerInterface $storeManager, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo, $routerId, \Magento\Framework\Code\NameBuilder $nameBuilder, \Magento\Framework\App\RouterListInterface $routerList, \Magento\UrlRewrite\App\Request\RewriteService $urlRewriteService, \Magento\DesignEditor\Helper\Data $designEditorHelper, \Magento\DesignEditor\Model\State $designEditorState, \Magento\Backend\Model\Auth\Session $session) { parent::__construct($actionList, $actionFactory, $defaultPath, $responseFactory, $routeConfig, $url, $storeManager, $scopeConfig, $urlSecurityInfo, $routerId, $nameBuilder); $this->_urlRewriteService = $urlRewriteService; $this->_routerList = $routerList; $this->_designEditorHelper = $designEditorHelper; $this->_state = $designEditorState; $this->_session = $session; }
public function testGetControllerClassName() { $this->assertEquals('Magento\\Core\\Controller\\Index', $this->_model->getActionClassName('Magento_Core', 'index')); }