Пример #1
0
 /**
  * @magentoDataFixture Magento/Widget/_files/layout_update.php
  */
 public function testFetchUpdatesByHandle()
 {
     /** @var $theme \Magento\Framework\View\Design\ThemeInterface */
     $theme = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Framework\\View\\Design\\ThemeInterface');
     $theme->load('Test Theme', 'theme_title');
     $result = $this->_resourceModel->fetchUpdatesByHandle('test_handle', $theme, \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Store\\Model\\StoreManagerInterface')->getStore());
     $this->assertEquals('not_temporary', $result);
 }
Пример #2
0
 /**
  * Around getDbUpdateString
  *
  * @param \Magento\Framework\View\Model\Layout\Merge $subject
  * @param callable $proceed
  * @param string $handle
  * @return string
  * @SuppressWarnings(PHPMD.UnusedFormalParameter)
  */
 public function aroundGetDbUpdateString(\Magento\Framework\View\Model\Layout\Merge $subject, \Closure $proceed, $handle)
 {
     return $this->update->fetchUpdatesByHandle($handle, $subject->getTheme(), $subject->getScope());
 }