mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
Merge branch '48304-29' of git://github.com/samhemelryk/moodle
This commit is contained in:
commit
f62b278a91
2 changed files with 14 additions and 0 deletions
|
@ -285,6 +285,16 @@ class core_weblib_testcase extends advanced_testcase {
|
||||||
$this->assertTrue($url1->compare($url2, URL_MATCH_BASE));
|
$this->assertTrue($url1->compare($url2, URL_MATCH_BASE));
|
||||||
$this->assertTrue($url1->compare($url2, URL_MATCH_PARAMS));
|
$this->assertTrue($url1->compare($url2, URL_MATCH_PARAMS));
|
||||||
$this->assertTrue($url1->compare($url2, URL_MATCH_EXACT));
|
$this->assertTrue($url1->compare($url2, URL_MATCH_EXACT));
|
||||||
|
|
||||||
|
$url1->set_anchor('test');
|
||||||
|
$this->assertTrue($url1->compare($url2, URL_MATCH_BASE));
|
||||||
|
$this->assertTrue($url1->compare($url2, URL_MATCH_PARAMS));
|
||||||
|
$this->assertFalse($url1->compare($url2, URL_MATCH_EXACT));
|
||||||
|
|
||||||
|
$url2->set_anchor('test');
|
||||||
|
$this->assertTrue($url1->compare($url2, URL_MATCH_BASE));
|
||||||
|
$this->assertTrue($url1->compare($url2, URL_MATCH_PARAMS));
|
||||||
|
$this->assertTrue($url1->compare($url2, URL_MATCH_EXACT));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_out_as_local_url() {
|
public function test_out_as_local_url() {
|
||||||
|
|
|
@ -646,6 +646,10 @@ class moodle_url {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($url->anchor !== $this->anchor) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue