function FaqAskTestCase::faqVerifyUrl in FAQ_Ask 6.2
Asserts the current url to the passed one
Parameters
string $url: The passed url to verify against
File
- ./
faq_ask.test, line 131 - Test FAQ functionality Base test class. All tests inherits this one. Hugely based on code from the test file block.test by boombatower
Class
- FaqAskTestCase
- Base class that is extended by test cases.
Code
function faqVerifyUrl($url, $msg) {
$current_url = parse_url($this
->getUrl());
if (!isset($current_url['query']) || $current_url['query'] == '') {
$this
->assertEqual($current_url['path'], $url, $msg);
}
else {
$query = substr($current_url['query'], 2);
// Split off the q= part
$this
->assertEqual($query, $url, $msg);
}
$this
->pass('Current URL:<pre>' . print_r($current_url, TRUE) . '</pre>');
}