当前位置: 首页>>代码示例>>PHP>>正文


PHP CmsIndex::getHeaderBlock方法代码示例

本文整理汇总了PHP中mage\cms\test\page\CmsIndex::getHeaderBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP CmsIndex::getHeaderBlock方法的具体用法?PHP CmsIndex::getHeaderBlock怎么用?PHP CmsIndex::getHeaderBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mage\cms\test\page\CmsIndex的用法示例。


在下文中一共展示了CmsIndex::getHeaderBlock方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processAssert

 /**
  * Assert that created CMS page displays with error message on unassigned store views on frontend.
  *
  * @param CmsPage $cms
  * @param FrontendCmsPage $frontendCmsPage
  * @param Browser $browser
  * @param CmsIndex $cmsIndex
  * @param string|null $notFoundMessage
  * @return void
  */
 public function processAssert(CmsPage $cms, FrontendCmsPage $frontendCmsPage, Browser $browser, CmsIndex $cmsIndex, $notFoundMessage = null)
 {
     $browser->open($_ENV['app_frontend_url'] . $cms->getIdentifier());
     $notFoundMessage = $notFoundMessage !== null ? $notFoundMessage : self::ERROR_MESSAGE;
     $cmsIndex->getHeaderBlock()->selectStore('Default Store View');
     \PHPUnit_Framework_Assert::assertContains($notFoundMessage, $frontendCmsPage->getCmsPageContentBlock()->getPageContent(), 'Wrong page content is displayed.');
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:17,代码来源:AssertCmsPageDisabledOnUnassignedStoreView.php

示例2: processAssert

 /**
  * Assert that Magento successfully installed.
  *
  * @param InstallWizardEnd $installWizardEnd
  * @param CmsIndex $cmsIndex
  * @param string $successInstallMessage
  * @return void
  */
 public function processAssert(InstallWizardEnd $installWizardEnd, CmsIndex $cmsIndex, $successInstallMessage)
 {
     // Check InstallWizardEnd page title text.
     \PHPUnit_Framework_Assert::assertEquals($successInstallMessage, $installWizardEnd->getMainBlock()->getTitle());
     // Check if header block on CmsIndex page is visible.
     $cmsIndex->open();
     \PHPUnit_Framework_Assert::assertTrue($cmsIndex->getHeaderBlock()->isVisible());
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:16,代码来源:AssertSuccessInstall.php

示例3: selectStore

 /**
  * Select store.
  *
  * @param Store $store
  * @return void
  */
 protected function selectStore(Store $store)
 {
     $headerBlock = $this->cmsIndexPage->getHeaderBlock();
     $footerBlock = $this->cmsIndexPage->getFooterBlock();
     if ($footerBlock->isStoreGroupSwitcherVisible() && $footerBlock->isStoreGroupVisible($store)) {
         $footerBlock->selectStoreGroup($store);
     }
     if ($headerBlock->isStoreViewDropdownVisible()) {
         $headerBlock->selectStore($store->getName());
     }
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:17,代码来源:AssertStoreLocalized.php

示例4: processAssert

 /**
  * Assert that product available by new URL on the frontend.
  *
  * @param Browser $browser
  * @param UrlRewrite $urlRewrite
  * @param CatalogProductSimple $product
  * @param CatalogProductView $catalogProductView
  * @param CmsIndex $cmsIndex
  * @param Cache $cachePage
  * @return void
  */
 public function processAssert(Browser $browser, UrlRewrite $urlRewrite, CatalogProductSimple $product, CatalogProductView $catalogProductView, CmsIndex $cmsIndex, Cache $cachePage)
 {
     $cachePage->open()->getPageActions()->flushCacheStorage();
     if ($urlRewrite->hasData('store_id')) {
         $storePath = explode('/', $urlRewrite->getStoreId());
         $cmsIndex->open();
         $cmsIndex->getHeaderBlock()->selectStore($storePath[2]);
     }
     $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath());
     \PHPUnit_Framework_Assert::assertEquals($catalogProductView->getViewBlock()->getProductName(), strtoupper($product->getName()), 'URL rewrite product redirect false.');
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:22,代码来源:AssertUrlRewriteProductRedirect.php

示例5: processAssert

 /**
  * Assert that created store view is not available on frontend.
  *
  * @param Store $store
  * @param CmsIndex $cmsIndex
  * @return void
  */
 public function processAssert(Store $store, CmsIndex $cmsIndex)
 {
     $cmsIndex->open();
     $footerBlock = $cmsIndex->getFooterBlock();
     $headerBlock = $cmsIndex->getHeaderBlock();
     if ($footerBlock->isStoreGroupSwitcherVisible() && $footerBlock->isStoreGroupVisible($store)) {
         $footerBlock->selectStoreGroup($store);
     }
     $isStoreViewVisible = $headerBlock->isStoreViewDropdownVisible() ? $headerBlock->isStoreViewVisible($store) : false;
     // if only one store view is assigned to store group
     \PHPUnit_Framework_Assert::assertFalse($isStoreViewVisible, "Store view '{$store->getName()}' is visible in dropdown on CmsIndex page.");
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:19,代码来源:AssertStoreNotOnFrontend.php

示例6: processAssert

 /**
  * Assert that created CMS page displays with error message on unassigned store views on frontend.
  *
  * @param CmsPage $cms
  * @param FrontendCmsPage $frontendCmsPage
  * @param Browser $browser
  * @param CmsIndex $cmsIndex
  * @return void
  */
 public function processAssert(CmsPage $cms, FrontendCmsPage $frontendCmsPage, Browser $browser, CmsIndex $cmsIndex)
 {
     $browser->open($_ENV['app_frontend_url'] . $cms->getIdentifier());
     $cmsIndex->getHeaderBlock()->selectStore('Default Store View');
     \PHPUnit_Framework_Assert::assertEquals(self::ERROR_MESSAGE, $frontendCmsPage->getCmsPageContentBlock()->getPageHeadTitle(), 'Wrong page content is displayed.');
 }
开发者ID:hientruong90,项目名称:ee_14_installer,代码行数:15,代码来源:AssertCmsPageDisabledOnUnassignedStoreView.php


注:本文中的mage\cms\test\page\CmsIndex::getHeaderBlock方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。