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


PHP CatalogProductView::getEventBlock方法代码示例

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


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

示例1: checkEventStatusOnProductPage

 /**
  * Event block has $this->eventStatus on Product Page.
  *
  * @return void
  */
 protected function checkEventStatusOnProductPage()
 {
     $categoryName = $this->product->getDatafieldConfig('category_ids')['source']->getProductCategory()->getName();
     $this->cmsIndex->open();
     $this->cmsIndex->getTopmenu()->selectCategory($categoryName);
     $this->catalogCategoryView->getListProductBlock()->openProductViewPage($this->product->getName());
     \PHPUnit_Framework_Assert::assertEquals($this->eventStatus, $this->catalogProductView->getEventBlock()->getEventStatus(), 'Wrong event status is displayed.');
 }
开发者ID:MikeTayC,项目名称:magento.dev,代码行数:13,代码来源:AbstactAssertCatalogEventStatus.php

示例2: checkEventBlockOnPage

 /**
  * Check event block on visibility on specified page.
  *
  * @param string $page
  * @param bool $positive [optional]
  * @return void
  */
 protected function checkEventBlockOnPage($page, $positive = true)
 {
     $this->cmsIndex->open();
     $this->cmsIndex->getTopmenu()->selectCategory($this->categoryName);
     if ($page == 'product_page') {
         $this->catalogCategoryView->getListProductBlock()->openProductViewPage($this->productName);
     }
     $eventBlockVisibility = $this->catalogProductView->getEventBlock()->isVisible();
     $positive == true ? \PHPUnit_Framework_Assert::assertTrue($eventBlockVisibility, "EventBlock is absent on {$page} page.") : \PHPUnit_Framework_Assert::assertFalse($eventBlockVisibility, "EventBlock is present on {$page} page.");
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:17,代码来源:AssertCatalogEventBlockOnFrontend.php

示例3: processAssert

 /**
  * Assert that event block is absent on category/product pages.
  *
  * @param CmsIndex $cmsIndex
  * @param CatalogCategoryView $catalogCategoryView
  * @param CatalogProductSimple $product
  * @param CatalogProductView $catalogProductView
  * @param Cache $adminCache
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, CatalogCategoryView $catalogCategoryView, CatalogProductSimple $product, CatalogProductView $catalogProductView, Cache $adminCache)
 {
     // Flush cache
     $adminCache->open();
     $adminCache->getPageActions()->flushCacheStorage();
     $adminCache->getMessagesBlock()->waitSuccessMessage();
     $categoryName = $product->getCategoryIds()[0];
     $cmsIndex->open();
     $cmsIndex->getTopmenu()->selectCategory($categoryName);
     \PHPUnit_Framework_Assert::assertFalse($catalogCategoryView->getEventBlock()->isVisible(), "Event block is present on Category page.");
     $cmsIndex->open();
     $cmsIndex->getTopmenu()->selectCategory($categoryName);
     $catalogCategoryView->getListProductBlock()->openProductViewPage($product->getName());
     \PHPUnit_Framework_Assert::assertFalse($catalogProductView->getEventBlock()->isVisible(), "Event block is present on Product page.");
 }
开发者ID:QiuLihua83,项目名称:magento-ee,代码行数:25,代码来源:AssertCatalogEventBlockIsAbsent.php


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