/** * Test loading invalid layout */ public function testLoadWithInvalidLayout() { $this->_model->addPageHandles(array('default')); $this->_appState->expects($this->any())->method('getMode')->will($this->returnValue('developer')); $this->_layoutValidator->expects($this->any())->method('getMessages')->will($this->returnValue(array('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->_store->getId()}_{$this->_theme->getId()}{$suffix}"; $messages = $this->_layoutValidator->getMessages(); // Testing error message is logged with logger $this->_logger->expects($this->once())->method('log')->with('Cache file with merged layout: ' . $cacheId . ': ' . array_shift($messages), \Zend_Log::ERR); $this->_model->load(); }