本文整理匯總了PHP中Shopware\Tests\Mink\Helper::hasNamedLinks方法的典型用法代碼示例。如果您正苦於以下問題:PHP Helper::hasNamedLinks方法的具體用法?PHP Helper::hasNamedLinks怎麽用?PHP Helper::hasNamedLinks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Shopware\Tests\Mink\Helper
的用法示例。
在下文中一共展示了Helper::hasNamedLinks方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: verifyPage
/**
* Verify if we're on an expected page. Throw an exception if not.
* @throws \Exception
*/
public function verifyPage()
{
if (Helper::hasNamedLinks($this, ['rssFeed', 'atomFeed']) == true) {
return;
}
$message = ['You are not on blog page!', 'Current URL: ' . $this->getSession()->getCurrentUrl()];
Helper::throwException($message);
}
示例2: verifyPage
/**
* Verify if we're on an expected page. Throw an exception if not.
*/
public function verifyPage()
{
$result = Helper::hasNamedLinks($this, ['compareLink', 'rememberLink', 'commentLink', 'inquiryLink']);
if ($result === true) {
return;
}
$message = ['You are not on a detail page:'];
foreach ($result as $key => $value) {
$message[] = "- Link '{$key}' ('{$value}') not found!";
}
$message[] = 'Current URL: ' . $this->getSession()->getCurrentUrl();
Helper::throwException($message);
}
示例3: verifyPageDashboard
/**
* Helper function to check weather we are on the account dashboard
* @return bool
*/
protected function verifyPageDashboard()
{
return Helper::hasNamedLinks($this, ['myAccountLink', 'myOrdersLink', 'myEsdDownloadsLink', 'changeBillingLink', 'changeShippingLink', 'changePaymentLink', 'noteLink', 'logoutLink']) === true ?: false;
}