function LinkCheckerInterfaceTest::setLinkAsBroken in Link checker 7
Set an URL as broken.
Parameters
string $url: URL of the link to find.
string $status: A fake HTTP code for testing.
2 calls to LinkCheckerInterfaceTest::setLinkAsBroken()
File
- ./
linkchecker.test, line 561 - Test file for Link checker module.
Class
Code
function setLinkAsBroken($url = NULL, $status = '404', $fail_count = 0) {
db_update('linkchecker_link')
->condition('urlhash', drupal_hash_base64($url))
->fields(array(
'code' => $status,
'error' => 'Not available (test running)',
'fail_count' => $fail_count,
'last_checked' => time(),
'status' => 1,
))
->execute();
}