/** * Create url model instance that will be used instead of \Magento\Framework\UrlInterface in navigation mode * * @param string $mode * @return void */ protected function _injectUrlModel($mode) { switch ($mode) { case self::MODE_NAVIGATION: default: $this->_urlModelFactory->replaceClassName(self::URL_MODEL_NAVIGATION_MODE_CLASS_NAME); break; } }
public function testReplaceClassName() { $this->_objectManager->expects($this->once())->method('configure')->with(array('preferences' => array('Magento\\Framework\\UrlInterface' => 'TestClass'))); $this->assertEquals($this->_model, $this->_model->replaceClassName('TestClass')); }