Skip to content

Commit

Permalink
MDL-40431 libraries: added another PHPUnit test to ensure deprecated …
Browse files Browse the repository at this point in the history
…function returns the same as the replacement
  • Loading branch information
mdjnelson committed Jul 11, 2013
1 parent 6c89d4e commit 9c03dff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/tests/accesslib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2476,10 +2476,11 @@ public function test_permission_evaluation() {
$this->assertDebuggingCalled('print_context_name() is deprecated, please use $context->get_context_name() instead.', DEBUG_DEVELOPER);
$this->assertFalse(empty($name));

get_context_url($coursecontext);
$url1 = get_context_url($coursecontext);
$this->assertDebuggingCalled('get_context_url() is deprecated, please use $context->get_url() instead.', DEBUG_DEVELOPER);
$url = $coursecontext->get_url();
$this->assertFalse($url instanceof modole_url);
$url2 = $coursecontext->get_url();
$this->assertEquals($url1, $url2);
$this->assertFalse($url2 instanceof modole_url);

$pagecm = get_coursemodule_from_instance('page', $testpages[7]);
$context = context_module::instance($pagecm->id);
Expand Down

0 comments on commit 9c03dff

Please sign in to comment.