mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +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
|
@ -33,6 +33,7 @@ use zip_archive;
|
|||
* @copyright 2019 Victor Deniz <victor@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @runTestsInSeparateProcesses
|
||||
* @covers \core_h5p\file_storage
|
||||
*/
|
||||
class file_storage_test extends \advanced_testcase {
|
||||
|
||||
|
@ -847,8 +848,6 @@ class file_storage_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test H5P custom styles generation.
|
||||
*
|
||||
* @covers ::generate_custom_styles
|
||||
*/
|
||||
public function test_generate_custom_styles(): void {
|
||||
\set_config('h5pcustomcss', '.debug { color: #fab; }', 'core_h5p');
|
||||
|
@ -895,8 +894,6 @@ class file_storage_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test H5P custom styles retrieval.
|
||||
*
|
||||
* @covers ::get_custom_styles
|
||||
*/
|
||||
public function test_get_custom_styles(): void {
|
||||
global $CFG;
|
||||
|
|
|
@ -1099,8 +1099,6 @@ class framework_test extends \advanced_testcase {
|
|||
|
||||
/**
|
||||
* Test the behaviour of updateContent() with metadata.
|
||||
*
|
||||
* @covers ::updateContent
|
||||
*/
|
||||
public function test_updateContent_withmetadata(): void {
|
||||
global $DB;
|
||||
|
|
|
@ -205,7 +205,6 @@ class helper_test extends \advanced_testcase {
|
|||
* Test the behaviour of save_h5p() when the H5P file contains metadata.
|
||||
*
|
||||
* @runInSeparateProcess
|
||||
* @covers ::save_h5p
|
||||
*/
|
||||
public function test_save_h5p_metadata(): void {
|
||||
global $DB;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue