當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CmsIndex::getTitleBlock方法代碼示例

本文整理匯總了PHP中Magento\Cms\Test\Page\CmsIndex::getTitleBlock方法的典型用法代碼示例。如果您正苦於以下問題:PHP CmsIndex::getTitleBlock方法的具體用法?PHP CmsIndex::getTitleBlock怎麽用?PHP CmsIndex::getTitleBlock使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Magento\Cms\Test\Page\CmsIndex的用法示例。


在下文中一共展示了CmsIndex::getTitleBlock方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 /**
  * Logout customer.
  *
  * @return void
  */
 public function run()
 {
     $this->customerAccount->open();
     $this->cmsIndex->getCmsPageBlock()->waitPageInit();
     if ($this->cmsIndex->getTitleBlock()->getTitle() != 'Customer Login') {
         $this->cmsIndex->getLinksBlock()->openLink('Sign Out');
         $this->cmsIndex->getCmsPageBlock()->waitUntilTextIsVisible('Home Page');
         $this->cmsIndex->getCmsPageBlock()->waitPageInit();
     }
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:15,代碼來源:LogoutCustomerOnFrontendStep.php

示例2: processAssert

 /**
  * Assert that the category cannot be accessed from the navigation bar in the frontend
  *
  * @param CmsIndex $cmsIndex
  * @param Category $category
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CmsIndex $cmsIndex, Category $category, BrowserInterface $browser)
 {
     $cmsIndex->open();
     \PHPUnit_Framework_Assert::assertFalse($cmsIndex->getTopmenu()->isCategoryVisible($category->getName()), 'Category can be accessed from the navigation bar in the frontend.');
     $browser->open($_ENV['app_frontend_url'] . $category->getUrlKey() . '.html');
     \PHPUnit_Framework_Assert::assertEquals(self::NOT_FOUND_MESSAGE, $cmsIndex->getTitleBlock()->getTitle(), 'Wrong page is displayed.');
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:15,代碼來源:AssertCategoryIsNotActive.php

示例3: processAssert

 /**
  * Assert that created CMS page with 'Status' - Disabled displays with '404 Not Found' message on Frontend.
  *
  * @param CmsPage $cms
  * @param FrontCmsIndex $frontCmsIndex
  * @param CmsPageIndex $cmsIndex
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CmsPage $cms, FrontCmsIndex $frontCmsIndex, CmsPageIndex $cmsIndex, BrowserInterface $browser)
 {
     $cmsIndex->open();
     $filter = ['title' => $cms->getTitle()];
     $cmsIndex->getCmsPageGridBlock()->searchAndPreview($filter);
     $browser->selectWindow();
     \PHPUnit_Framework_Assert::assertEquals(self::NOT_FOUND_MESSAGE, $frontCmsIndex->getTitleBlock()->getTitle(), 'Wrong page is displayed.');
 }
開發者ID:pradeep-wagento,項目名稱:magento2,代碼行數:17,代碼來源:AssertCmsPageDisabledOnFrontend.php

示例4: addToCart

 /**
  * Add product to cart from Cross-sell section.
  *
  * @param InjectableFixture $product
  * @return void
  */
 protected function addToCart(InjectableFixture $product)
 {
     $this->checkoutCart->getCrosssellBlock()->getProductItem($product)->clickAddToCart();
     if ($this->cmsIndex->getTitleBlock()->getTitle() == $product->getName()) {
         $this->catalogProductView->getViewBlock()->addToCart($product);
     }
     $this->catalogProductView->getMessagesBlock()->waitSuccessMessage();
 }
開發者ID:andrewhowdencom,項目名稱:m2onk8s,代碼行數:14,代碼來源:AddToCartCrossSellTest.php

示例5: processAssert

 /**
  * Assert check URL rewrite custom redirect
  *
  * @param UrlRewrite $urlRewrite
  * @param BrowserInterface $browser
  * @param CmsIndex $cmsIndex
  * @return void
  */
 public function processAssert(UrlRewrite $urlRewrite, BrowserInterface $browser, CmsIndex $cmsIndex)
 {
     $browser->open($_ENV['app_frontend_url'] . $urlRewrite->getRequestPath());
     $entity = $urlRewrite->getDataFieldConfig('target_path')['source']->getEntity();
     $title = $entity->hasData('name') ? $entity->getName() : $entity->getContentHeading();
     $pageTitle = $cmsIndex->getTitleBlock()->getTitle();
     \PHPUnit_Framework_Assert::assertEquals($pageTitle, $title, 'URL rewrite product redirect false.' . "\nExpected: " . $title . "\nActual: " . $pageTitle);
 }
開發者ID:kidaa30,項目名稱:magento2-platformsh,代碼行數:16,代碼來源:AssertUrlRewriteCustomRedirect.php

示例6: processAssert

 /**
  * Assert that content of created cms page displayed in section 'maincontent' and equals passed from fixture.
  *
  * @param CmsPageIndex $cmsIndex
  * @param FrontCmsIndex $frontCmsIndex
  * @param FrontCmsPage $frontCmsPage
  * @param CmsPage $cms
  * @param BrowserInterface $browser
  * @return void
  */
 public function processAssert(CmsPageIndex $cmsIndex, FrontCmsIndex $frontCmsIndex, FrontCmsPage $frontCmsPage, CmsPage $cms, BrowserInterface $browser)
 {
     $cmsIndex->open();
     $filter = ['title' => $cms->getTitle()];
     $cmsIndex->getCmsPageGridBlock()->searchAndPreview($filter);
     $browser->selectWindow();
     $fixtureContent = $cms->getContent();
     \PHPUnit_Framework_Assert::assertContains($fixtureContent['content'], $frontCmsPage->getCmsPageBlock()->getPageContent(), 'Wrong content is displayed.');
     if (isset($fixtureContent['widget'])) {
         foreach ($fixtureContent['widget']['preset'] as $widget) {
             \PHPUnit_Framework_Assert::assertTrue($frontCmsPage->getCmsPageBlock()->isWidgetVisible($widget['widget_type'], $widget['anchor_text']), 'Widget \'' . $widget['widget_type'] . '\' is not displayed.');
         }
     }
     if ($cms->getContentHeading()) {
         \PHPUnit_Framework_Assert::assertEquals($cms->getContentHeading(), $frontCmsIndex->getTitleBlock()->getTitle(), 'Wrong title is displayed.');
     }
 }
開發者ID:shabbirvividads,項目名稱:magento2,代碼行數:27,代碼來源:AssertCmsPagePreview.php


注:本文中的Magento\Cms\Test\Page\CmsIndex::getTitleBlock方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。