本文整理汇总了PHP中Magento\Catalog\Test\Page\Product\CatalogProductView::getAdditionalInformationBlock方法的典型用法代码示例。如果您正苦于以下问题:PHP CatalogProductView::getAdditionalInformationBlock方法的具体用法?PHP CatalogProductView::getAdditionalInformationBlock怎么用?PHP CatalogProductView::getAdditionalInformationBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Catalog\Test\Page\Product\CatalogProductView
的用法示例。
在下文中一共展示了CatalogProductView::getAdditionalInformationBlock方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processAssert
/**
* Check whether html tags are using in attribute value.
* Checked tag structure <b><i>atttribute_default_value</p></i></b>
*
* @param InjectableFixture $product
* @param CatalogProductAttribute $attribute
* @param CatalogProductView $catalogProductView
* @param BrowserInterface $browser
* @throws \Exception
* @return void
*/
public function processAssert(InjectableFixture $product, CatalogProductAttribute $attribute, CatalogProductView $catalogProductView, BrowserInterface $browser)
{
$browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
\PHPUnit_Framework_Assert::assertTrue($catalogProductView->getAdditionalInformationBlock()->hasHtmlTagInAttributeValue($attribute), 'Attribute is not visible with HTML tags on frontend.');
}
示例2: processAssert
/**
* Check whether the attribute is visible on the frontend.
*
* @param InjectableFixture $product
* @param CatalogProductAttribute $attribute
* @param CatalogProductView $catalogProductView
* @param BrowserInterface $browser
* @return void
*/
public function processAssert(InjectableFixture $product, CatalogProductAttribute $attribute, CatalogProductView $catalogProductView, BrowserInterface $browser)
{
$browser->open($_ENV['app_frontend_url'] . $product->getUrlKey() . '.html');
\PHPUnit_Framework_Assert::assertTrue(in_array($attribute->getFrontendLabel(), $catalogProductView->getAdditionalInformationBlock()->getAttributeLabels()), 'Attribute is not visible on product page in additional info block on frontend.');
}