MDL-72743 tests: tidy up the new test with NS/name/covers
Ideally any new test should be using a class name matching the file name, and to use namespace when clearly belonging to a component (sub-namespace also allowed for better accuracy). And, also, adding a @covers label to indicate which class (preferred, method is also possible) is being covered with the test.
This commit is contained in:
@@ -14,6 +14,13 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
namespace mod_quiz;
|
||||
|
||||
use backup;
|
||||
use core_user;
|
||||
use restore_controller;
|
||||
use restore_dbops;
|
||||
|
||||
/**
|
||||
* Unit tests restoring quiz attempts
|
||||
*
|
||||
@@ -21,7 +28,7 @@
|
||||
* @copyright 2021 Paul Holden <[email protected]>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class mod_quiz_restore_attempt_test extends advanced_testcase {
|
||||
class restore_attempt_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Load required libraries
|
||||
@@ -34,6 +41,8 @@ class mod_quiz_restore_attempt_test extends advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test restore dates.
|
||||
*
|
||||
* @covers \restore_quiz_activity_structure_step
|
||||
*/
|
||||
public function test_restore_question_attempts_missing_users(): void {
|
||||
global $DB, $USER;
|
||||
|
||||
Reference in New Issue
Block a user