示例#1
0
 public function testLoadDbApp()
 {
     $this->_resource->expects($this->once())->method('fetchUpdatesByHandle')->with('fixture_handle', $this->_theme, $this->_store)->will($this->returnValue(self::FIXTURE_LAYOUT_XML));
     $this->assertEmpty($this->_model->getHandles());
     $this->assertEmpty($this->_model->asString());
     $handles = array('fixture_handle');
     $this->_model->load($handles);
     $this->assertEquals($handles, $this->_model->getHandles());
     $this->assertXmlStringEqualsXmlString(self::FIXTURE_LAYOUT_XML, $this->_model->asString());
 }
示例#2
0
 public function testLoadDbAppNotInstalled()
 {
     $this->_appState->expects($this->any())->method('isInstalled')->will($this->returnValue(false));
     $this->_resource->expects($this->never())->method('fetchUpdatesByHandle');
     $this->assertEmpty($this->_model->getHandles());
     $this->assertEmpty($this->_model->asString());
     $handles = array('fixture_handle');
     $this->_model->load($handles);
     $this->assertEquals($handles, $this->_model->getHandles());
     $this->assertEmpty($this->_model->asString());
 }