MDL-63842 core_user: Remove unnecessary DB fetch
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 2 Nov 2018 01:07:18 +0000 (09:07 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 2 Nov 2018 01:07:18 +0000 (09:07 +0800)
user/tests/userlib_test.php

index 86a53f0..9dc3c32 100644 (file)
@@ -645,7 +645,6 @@ class core_userliblib_testcase extends advanced_testcase {
         $this->setUser($user8);
         $this->assertFalse(user_can_view_profile($user1));
 
         $this->setUser($user8);
         $this->assertFalse(user_can_view_profile($user1));
 
-        $allroles = $DB->get_records_menu('role', array(), 'id', 'archetype, id');
         // Let us test with guest user.
         $this->setGuestUser();
         $CFG->forceloginforprofiles = 1;
         // Let us test with guest user.
         $this->setGuestUser();
         $CFG->forceloginforprofiles = 1;