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


PHP Helper::hasNamedButton方法代碼示例

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


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

示例1: verifyPage

 /**
  * Verify if we're on an expected page. Throw an exception if not.
  * @throws \Exception
  */
 public function verifyPage()
 {
     $errors = [];
     if (!$this->hasField("sCaptcha")) {
         $errors[] = "- captcha input field not found!";
     }
     if (!Helper::hasNamedButton($this, 'submitButton')) {
         $errors[] = "- submit button not found!";
     }
     if (!$errors) {
         return;
     }
     $message = ['You are not on a form page:'];
     $message = array_merge($message, $errors);
     $message[] = 'Current URL: ' . $this->getSession()->getCurrentUrl();
     Helper::throwException($message);
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:21,代碼來源:Form.php

示例2: verifyPageRegister

 /**
  * Helper function to check weather we are on the register page
  * @return bool
  */
 protected function verifyPageRegister()
 {
     return $this->hasSelect('register[personal][customer_type]') && $this->hasSelect('register[personal][salutation]') && $this->hasField('register[personal][firstname]') && $this->hasField('register[personal][lastname]') && $this->hasField('register[personal][email]') && $this->hasField('register[personal][password]') && $this->hasField('register[billing][company]') && $this->hasField('register[billing][department]') && $this->hasField('register[billing][ustid]') && $this->hasField('register[billing][street]') && $this->hasField('register[billing][zipcode]') && $this->hasField('register[billing][city]') && $this->hasSelect('register[billing][country]') && $this->hasField('register[billing][shippingAddress]') && $this->hasSelect('register[shipping][salutation]') && $this->hasField('register[shipping][company]') && $this->hasField('register[shipping][department]') && $this->hasField('register[shipping][firstname]') && $this->hasField('register[shipping][lastname]') && $this->hasField('register[shipping][street]') && $this->hasField('register[shipping][zipcode]') && $this->hasField('register[shipping][city]') && $this->hasSelect('register[shipping][country]') && Helper::hasNamedButton($this, 'sendButton');
 }
開發者ID:GerDner,項目名稱:luck-docker,代碼行數:8,代碼來源:Account.php


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