/** * Create url model instance that will be used instead of Mage_Core_Model_Url in navigation mode */ protected function _injectUrlModel($mode) { switch ($mode) { case self::MODE_DESIGN: $this->_urlModelFactory->replaceClassName(self::URL_MODEL_DESIGN_MODE_CLASS_NAME); break; 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('addAlias')->with('Mage_Core_Model_Url', 'TestClass'); $this->assertEquals($this->_model, $this->_model->replaceClassName('TestClass')); }