Merge branch '48304-29' of git://github.com/samhemelryk/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2014-11-25 00:23:42 +01:00
commit f62b278a91
2 changed files with 14 additions and 0 deletions

View File

@ -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_PARAMS));
$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() {

View File

@ -646,6 +646,10 @@ class moodle_url {
}
}
if ($url->anchor !== $this->anchor) {
return false;
}
return true;
}