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


PHP Helper::getPageInfo方法代码示例

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


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

示例1: verifyPage

 /**
  * Verify if we're on an expected page. Throw an exception if not.
  * @throws \Exception
  */
 public function verifyPage()
 {
     $info = Helper::getPageInfo($this->getSession(), ['controller']);
     if ($info['controller'] === 'note') {
         return;
     }
     $message = ['You are not on the note!', 'Current URL: ' . $this->getSession()->getCurrentUrl()];
     Helper::throwException($message);
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:13,代码来源:Note.php

示例2: verifyPage

 /**
  * @param string $language
  * @return bool
  * @throws \Exception
  */
 public function verifyPage($language = '')
 {
     $info = Helper::getPageInfo($this->getSession(), ['controller', 'action']);
     if ($info['controller'] === 'checkout' && $info['action'] === 'cart') {
         return Helper::hasNamedLink($this, 'checkout', $language);
     }
     $message = ['You are not on the cart!', 'Current URL: ' . $this->getSession()->getCurrentUrl()];
     Helper::throwException($message);
     return false;
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:15,代码来源:CheckoutCart.php

示例3: iSubscribeToTheNewsletterWith

 /**
  * @When /^I subscribe to the newsletter with "(?P<email>[^"]*)"$/
  * @When /^I subscribe to the newsletter with "(?P<email>[^"]*)" :$/
  */
 public function iSubscribeToTheNewsletterWith($email, TableNode $additionalData = null)
 {
     $pageInfo = Helper::getPageInfo($this->getSession(), ['controller']);
     $pageName = ucfirst($pageInfo['controller']);
     $data = [['field' => 'newsletter', 'value' => $email]];
     if ($pageName === 'Index') {
         $pageName = 'Homepage';
     } elseif ($pageName === 'Newsletter' && $additionalData) {
         $data = array_merge($data, $additionalData->getHash());
     }
     /** @var Homepage|\Shopware\Tests\Mink\Page\Emotion\Newsletter $page */
     $page = $this->getPage($pageName);
     $page->subscribeNewsletter($data);
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:18,代码来源:ShopwareContext.php

示例4: theCurrentPaymentMethodShouldBe

 /**
  * @Then /^the current payment method should be "([^"]*)"$/
  */
 public function theCurrentPaymentMethodShouldBe($paymentMethod)
 {
     $pageInfo = Helper::getPageInfo($this->getSession(), array('controller'));
     $pageName = ucfirst($pageInfo['controller']) === 'Checkout' ? 'CheckoutConfirm' : 'Account';
     $this->getPage($pageName)->checkPaymentMethod($paymentMethod);
 }
开发者ID:BucherStoerzbachGbR,项目名称:shopware,代码行数:9,代码来源:AccountContext.php


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