本文整理汇总了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');
}