本文整理匯總了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.");
}