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