本文整理匯總了PHP中Shopware\Tests\Mink\Helper::hasNamedLink方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helper::hasNamedLink方法的具體用法?PHP Helper::hasNamedLink怎麽用?PHP Helper::hasNamedLink使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Shopware\Tests\Mink\Helper
的用法示例。
在下文中一共展示了Helper::hasNamedLink方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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;
}
示例2: verifyPage
/**
* @inheritdoc
*/
public function verifyPage()
{
if (Helper::hasNamedLink($this, 'moreProducts')) {
return;
}
$errors = [];
if (!$this->hasLink('Filtern')) {
$errors[] = '- There is no filter link!';
}
if (!$this->hasSelect('o')) {
$errors[] = '- There is no order select!';
}
if (!$errors) {
return;
}
$message = ['You are not on a listing:'];
$message = array_merge($message, $errors);
$message[] = 'Current URL: ' . $this->getSession()->getCurrentUrl();
Helper::throwException($message);
}
示例3: verifyPage
/**
* @param string $language
* @return bool
*/
public function verifyPage($language = '')
{
return Helper::hasNamedLink($this, 'checkout', $language);
}
示例4: verifyPageLogin
/**
* Helper function to check weather we are on the login page
* @return bool
*/
protected function verifyPageLogin()
{
return $this->hasField('email') && $this->hasField('password') && Helper::hasNamedLink($this, 'forgotPasswordLink') && Helper::hasNamedButton($this, 'loginButton');
}