1 system.test | ConfirmFormTest::assertCancelLinkUrl($url, $message = '', $group = 'Other') |
Asserts that a cancel link is present pointing to the provided URL.
File
- core/
modules/ system/ tests/ system.test, line 2729 - Tests for system.module.
Class
- ConfirmFormTest
- Tests confirm form destinations.
Code
function assertCancelLinkUrl($url, $message = '', $group = 'Other') {
$links = $this->xpath('//a[normalize-space(text())=:label and @href=:url]', array(':label' => t('Cancel'), ':url' => $url));
$message = ($message ? $message : format_string('Cancel link with url %url found.', array('%url' => $url)));
return $this->assertTrue(isset($links[0]), $message, $group);
}