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


PHP Mink\Helper類代碼示例

本文整理匯總了PHP中Shopware\Tests\Mink\Helper的典型用法代碼示例。如果您正苦於以下問題:PHP Helper類的具體用法?PHP Helper怎麽用?PHP Helper使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: unsubscribeNewsletter

 /**
  * @param array $data
  */
 public function unsubscribeNewsletter(array $data)
 {
     $mode = array(array('field' => 'subscribeToNewsletter', 'value' => -1));
     $data = array_merge($data, $mode);
     Helper::fillForm($this, 'newsletterForm', $data);
     Helper::pressNamedButton($this, 'newsletterFormSubmit');
 }
開發者ID:BucherStoerzbachGbR,項目名稱:shopware,代碼行數:10,代碼來源:Newsletter.php

示例2: pressShowResults

 /**
  * @throws \Exception
  */
 private function pressShowResults()
 {
     $elements = Helper::findElements($this, ['filterShowResults']);
     /** @var NodeElement $showResults */
     $showResults = $elements['filterShowResults'];
     $showResults->press();
 }
開發者ID:BucherStoerzbachGbR,項目名稱:shopware,代碼行數:10,代碼來源:Listing.php

示例3: submitNotification

 /**
  * Fills the notification form and submits it
  * @param string $email
  */
 public function submitNotification($email)
 {
     $data = [['field' => 'sNotificationEmail', 'value' => $email]];
     Helper::fillForm($this, 'notificationForm', $data);
     $elements = Helper::findElements($this, ['notificationSubmit']);
     $elements['notificationSubmit']->press();
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:11,代碼來源:Detail.php

示例4: getNameProperty

 /**
  * Returns the name
  * @param NodeElement $slide
  * @return string
  */
 public function getNameProperty(NodeElement $slide)
 {
     $selectors = Helper::getRequiredSelectors($this, ['slideImage', 'slideLink', 'slideName']);
     $nameElement = $slide->find('css', $selectors['slideName']);
     $names = ['imageAlt' => $slide->find('css', $selectors['slideImage'])->getAttribute('alt'), 'linkTitle' => $slide->find('css', $selectors['slideLink'])->getAttribute('title'), 'name' => $nameElement->getText(), 'nameTitle' => $nameElement->getAttribute('title')];
     return Helper::getUnique($names);
 }
開發者ID:BucherStoerzbachGbR,項目名稱:shopware,代碼行數:12,代碼來源:ArticleSlider.php

示例5: changeShippingMethod

 /**
  * Changes the shipping method
  * @param array $data
  */
 public function changeShippingMethod(array $data = [])
 {
     $element = $this->getElement('CheckoutPayment');
     Helper::clickNamedLink($element, 'changeButton');
     Helper::fillForm($this, 'shippingPaymentForm', $data);
     Helper::pressNamedButton($this, 'changePaymentButton');
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:11,代碼來源:CheckoutConfirm.php

示例6: getPaymentMethodProperty

 /**
  * Returns the current payment method
  * @return string
  */
 public function getPaymentMethodProperty()
 {
     $element = Helper::findElements($this, ['currentMethod']);
     $currentMethod = $element['currentMethod']->getText();
     $currentMethod = str_word_count($currentMethod, 1);
     return $currentMethod[0];
 }
開發者ID:BucherStoerzbachGbR,項目名稱:shopware,代碼行數:11,代碼來源:CheckoutPayment.php

示例7: changeShippingMethod

 /**
  * Changes the shipping method
  * @param array $data
  */
 public function changeShippingMethod($data = array())
 {
     $element = $this->getElement('CheckoutPayment');
     $language = Helper::getCurrentLanguage($this);
     Helper::clickNamedLink($element, 'changeButton', $language);
     Helper::fillForm($this, 'shippingPaymentForm', $data);
     Helper::pressNamedButton($this, 'changePaymentButton');
 }
開發者ID:BucherStoerzbachGbR,項目名稱:shopware,代碼行數:12,代碼來源:CheckoutConfirm.php

示例8: iOrderTheArticleOnPosition

 /**
  * @When /^I order the article on position (?P<position>\d+)$/
  */
 public function iOrderTheArticleOnPosition($position)
 {
     /** @var Listing $page */
     $page = $this->getPage('Listing');
     /** @var ArticleBox $articleBox */
     $articleBox = $this->getMultipleElement($page, 'ArticleBox', $position);
     Helper::clickNamedLink($articleBox, 'order');
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:11,代碼來源:ListingContext.php

示例9: iClickToReadTheBlogArticleOnPosition

 /**
  * @Given /^I click to read the blog article on position (\d+)$/
  */
 public function iClickToReadTheBlogArticleOnPosition($position)
 {
     /** @var Blog $page */
     $page = $this->getPage('Blog');
     /** @var BlogBox $blogBox */
     $blogBox = $this->getMultipleElement($page, 'BlogBox', $position);
     Helper::clickNamedLink($blogBox, 'readMore');
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:11,代碼來源:BlogContext.php

示例10: clickActionLink

 private function clickActionLink($position, $name)
 {
     /** @var Note $page */
     $page = $this->getPage('Note');
     /** @var NotePosition $notePosition */
     $notePosition = $this->getMultipleElement($page, 'NotePosition', $position);
     Helper::clickNamedLink($notePosition, $name);
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:8,代碼來源:NoteContext.php

示例11: submitNotification

 /**
  * Fills the notification form and submits it
  * @param string $email
  */
 public function submitNotification($email)
 {
     $data = array(array('field' => 'sNotificationEmail', 'value' => $email));
     Helper::fillForm($this, 'notificationForm', $data);
     $locators = array('notificationSubmit');
     $elements = Helper::findElements($this, $locators);
     $elements['notificationSubmit']->press();
 }
開發者ID:BucherStoerzbachGbR,項目名稱:shopware,代碼行數:12,代碼來源:Detail.php

示例12: proceedToOrderConfirmationWithLogin

 /**
  * Proceeds to the confirmation page with login
  * @param string $eMail
  * @param string $password
  */
 public function proceedToOrderConfirmationWithLogin($eMail, $password)
 {
     if ($this->verifyPage()) {
         Helper::clickNamedLink($this, 'checkout');
     }
     $this->getPage('Account')->login($eMail, $password);
     $this->getPage('CheckoutConfirm')->verifyPage();
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:13,代碼來源:CheckoutCart.php

示例13: changeCurrency

 /**
  * Changes the currency
  * @param string $currency
  * @throws \Behat\Mink\Exception\ElementNotFoundException
  */
 public function changeCurrency($currency)
 {
     if (!$this->getDriver() instanceof Selenium2Driver) {
         Helper::throwException('Changing the currency in Responsive template requires Javascript!');
     }
     $valid = ['EUR' => '€ EUR', 'USD' => '$ USD'];
     $this->selectFieldOption('__currency', $valid[$currency]);
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:13,代碼來源:Homepage.php

示例14: pressShowResults

 /**
  * Submits the filters
  * @throws \Exception
  */
 private function pressShowResults()
 {
     $this->getSession()->wait(5000, "\$('.filter--btn-apply:not(.is--loading):not([disabled=disabled])').length > 0");
     $elements = Helper::findElements($this, ['filterShowResults']);
     /** @var NodeElement $showResults */
     $showResults = $elements['filterShowResults'];
     $showResults->press();
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:12,代碼來源:Listing.php

示例15: getProperties

 /**
  * @param array $locators
  * @return array
  */
 public function getProperties(array $locators)
 {
     $return = array();
     $elements = Helper::findElements($this, $locators);
     foreach ($elements as $locator => $element) {
         $funcName = 'get' . ucfirst($locator);
         $return[$locator] = $this->{$funcName}($element);
     }
     return $return;
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:14,代碼來源:BlogComment.php


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