本文整理汇总了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.');
}
示例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.");
}
示例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.");
}