mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
MDL-82207 phpunit: fix various @covers annotations (take#1)
This fixes various (not all) wrong @covers annotations that are reported as warnings by PHPUnit when it's run with code-coverage enabled. When possible, the preferred solution is to change to @covers at class level, that is the recommended way. If multiple classes are involved, then a mix of @coversDefaultClass and @covers at method level are used (always trying to use the minimum needed patch). This is the first of a series of issues created as sub-tasks of MDL-82142.
This commit is contained in:
parent
ad7fc69c25
commit
ad5fe71868
53 changed files with 75 additions and 128 deletions
|
@ -23,6 +23,7 @@ namespace core_completion;
|
|||
* @category test
|
||||
* @copyright 2017 Mark Nelson <markn@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \core_completion\api
|
||||
*/
|
||||
class api_test extends \advanced_testcase {
|
||||
|
||||
|
@ -292,7 +293,6 @@ class api_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test for mark_course_completions_activity_criteria() with different completionpassgrade settings.
|
||||
* @covers ::mark_course_completions_activity_criteria
|
||||
*/
|
||||
public function test_mark_course_completions_activity_criteria_completion_states(): void {
|
||||
global $DB, $CFG;
|
||||
|
|
|
@ -25,6 +25,7 @@ use completion_completion;
|
|||
* @category test
|
||||
* @copyright 2017 Mark Nelson <markn@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @covers \core_completion\progress
|
||||
*/
|
||||
class progress_test extends \advanced_testcase {
|
||||
|
||||
|
@ -123,8 +124,6 @@ class progress_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Tests that the course progress percentage is returned correctly for various grade to pass settings
|
||||
*
|
||||
* @covers \core_completion\progress::get_course_progress_percentage.
|
||||
*/
|
||||
public function test_course_progress_percentage_completion_state(): void {
|
||||
global $DB, $CFG;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue