/**
  * @magentoAppIsolation enabled
  * @magentoDataFixture Magento/Core/_files/store.php
  */
 public function testGetProcessedTemplateSubject()
 {
     \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\App\\AreaList')->getArea(\Magento\Framework\App\Area::AREA_FRONTEND)->load();
     $this->_setNotDefaultThemeForFixtureStore();
     $expectedViewUrl = 'static/frontend/Magento/plushe/en_US/Magento_Theme/favicon.ico';
     $this->_model->setTemplateSubject('{{view url="Magento_Theme::favicon.ico"}}');
     $this->assertStringEndsNotWith($expectedViewUrl, $this->_model->getProcessedTemplateSubject(array()));
     $this->_model->setDesignConfig(array('area' => 'frontend', 'store' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\StoreManagerInterface')->getStore('fixturestore')->getId()));
     $this->assertStringEndsWith($expectedViewUrl, $this->_model->getProcessedTemplateSubject(array()));
 }
Esempio n. 2
0
 /**
  * @magentoAppIsolation enabled
  * @magentoDataFixture Magento/Store/_files/core_fixturestore.php
  */
 public function testGetProcessedTemplateSubject()
 {
     $this->mockModel();
     $this->objectManager->get('Magento\\Framework\\App\\AreaList')->getArea(Area::AREA_FRONTEND)->load();
     $this->setNotDefaultThemeForFixtureStore();
     $expectedViewUrl = 'static/frontend/Magento/blank/en_US/Magento_Theme/favicon.ico';
     $this->model->setTemplateSubject('{{view url="Magento_Theme::favicon.ico"}}');
     $this->assertStringEndsNotWith($expectedViewUrl, $this->model->getProcessedTemplateSubject([]));
     $this->model->setDesignConfig(['area' => 'frontend', 'store' => $this->objectManager->get('Magento\\Store\\Model\\StoreManagerInterface')->getStore('fixturestore')->getId()]);
     $this->assertStringEndsWith($expectedViewUrl, $this->model->getProcessedTemplateSubject([]));
 }