예제 #1
0
파일: State.php 프로젝트: aiesh/magento2
 /**
  * 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;
     }
 }
예제 #2
0
 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'));
 }