public function testGetCurrentUrl() { $this->model->load('admin'); $this->model->expects($this->any())->method('getUrl')->will($this->returnValue('http://localhost/index.php')); $this->assertStringEndsWith('default', $this->model->getCurrentUrl()); $this->assertStringEndsNotWith('default', $this->model->getCurrentUrl(false)); }
/** * {@inheritdoc} */ public function load($key, $field = null) { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'load'); if (!$pluginInfo) { return parent::load($key, $field); } else { return $this->___callPlugins('load', func_get_args(), $pluginInfo); } }
/** * @param string $chunkId * @param string $storeId * @param string $processId * @param \Magento\Framework\App\Console\Response $response */ public function __construct($chunkId, $storeId, $processId, \Celebros\Celexport\Helper\Export $helper, \Magento\Store\Model\Store $store, \Celebros\Celexport\Model\Cache $cache, \Magento\Framework\App\State $state, \Magento\Framework\ObjectManagerInterface $objectManager) { $this->_chunkId = $chunkId; $this->_storeId = $storeId; $this->_store = $store->load($this->_storeId); $this->_cache = $cache; $this->_processId = $processId; $this->_state = $state; $this->_objectManager = $objectManager; $this->helper = $helper; }