本文整理匯總了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);
}
示例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');
}