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:
Eloy Lafuente (stronk7) 2024-06-17 18:07:47 +02:00
parent ad7fc69c25
commit ad5fe71868
No known key found for this signature in database
GPG key ID: 53487A05E6228820
53 changed files with 75 additions and 128 deletions

View file

@ -23,7 +23,7 @@ namespace core_adminpresets;
* @category test
* @copyright 2021 Sara Arjona (sara@moodle.com)
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass helper
* @coversDefaultClass \core_adminpresets\helper
*/
class helper_test extends \advanced_testcase {

View file

@ -32,7 +32,7 @@ require_once("{$CFG->dirroot}/reportbuilder/tests/helpers.php");
* Unit tests for roles datasource
*
* @package core_role
* @covers \core_role\reportbuilder\datasource\roles;
* @covers \core_role\reportbuilder\datasource\roles
* @copyright 2024 Paul Holden <paulh@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/