Skip to content

Commit

Permalink
MDL-72743 tests: tidy up the new test with NS/name/covers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stronk7 committed Oct 28, 2021
1 parent 48c3f68 commit 0a8666b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mod/quiz/tests/restore_attempt_test.php
Expand Up @@ -14,14 +14,21 @@
// 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
*
* @package mod_quiz
* @copyright 2021 Paul Holden <paulh@moodle.com>
* @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
Expand All @@ -34,6 +41,8 @@ public static function setUpBeforeClass(): void {

/**
* Test restore dates.
*
* @covers \restore_quiz_activity_structure_step
*/
public function test_restore_question_attempts_missing_users(): void {
global $DB, $USER;
Expand Down

0 comments on commit 0a8666b

Please sign in to comment.