Skip to content
Browse files

MDL-34472 phpunit: Make sure a debugging is thrown when get_context_i…

…nstance() is called
  • Loading branch information...
ankitagarwal committed Jul 2, 2013
1 parent bea86e8 commit bfb99cc6198ae2e705f129a0b7c31072f5cb9d11
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/tests/accesslib_test.php
@@ -2367,6 +2367,10 @@ public function test_permission_evaluation() {
$this->assertEquals(count($children), $DB->count_records('context')-1);
// Make sure a debugging is thrown.
get_context_instance($record->contextlevel, $record->instanceid);
$this->assertDebuggingCalled('get_context_instance() is deprecated, please use respective context_xxxx::instance().', DEBUG_DEVELOPER);
$DB->delete_records('context', array('contextlevel'=>CONTEXT_BLOCK));
$this->assertFalse($DB->record_exists('context', array('contextlevel'=>CONTEXT_BLOCK)));

0 comments on commit bfb99cc

Please sign in to comment.
You can’t perform that action at this time.