Beispiel #1
0
 /**
  * Test loading invalid layout
  */
 public function testLoadWithInvalidLayout()
 {
     $this->_model->addPageHandles(['default']);
     $this->_appState->expects($this->any())->method('getMode')->will($this->returnValue('developer'));
     $this->_layoutValidator->expects($this->any())->method('getMessages')->will($this->returnValue(['testMessage1', 'testMessage2']));
     $this->_layoutValidator->expects($this->any())->method('isValid')->will($this->returnValue(false));
     $suffix = md5(implode('|', $this->_model->getHandles()));
     $cacheId = "LAYOUT_{$this->_theme->getArea()}_STORE{$this->scope->getId()}_{$this->_theme->getId()}{$suffix}";
     $messages = $this->_layoutValidator->getMessages();
     // Testing error message is logged with logger
     $this->_logger->expects($this->once())->method('info')->with('Cache file with merged layout: ' . $cacheId . ' and handles default' . ': ' . array_shift($messages));
     $this->_model->load();
 }
 /**
  * {@inheritdoc}
  */
 public function addPageHandles(array $handlesToTry)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'addPageHandles');
     if (!$pluginInfo) {
         return parent::addPageHandles($handlesToTry);
     } else {
         return $this->___callPlugins('addPageHandles', func_get_args(), $pluginInfo);
     }
 }