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:
+3
-3
@@ -332,7 +332,7 @@ class external_api_test extends \advanced_testcase {
|
||||
/**
|
||||
* Test \core_external\external_api::get_context()_from_params parameter validation.
|
||||
*
|
||||
* @covers \core_external\external_api::get_context
|
||||
* @covers \core_external\external_api::get_context_from_params
|
||||
*/
|
||||
public function test_get_context_params(): void {
|
||||
global $USER;
|
||||
@@ -345,7 +345,7 @@ class external_api_test extends \advanced_testcase {
|
||||
/**
|
||||
* Test \core_external\external_api::get_context()_from_params parameter validation.
|
||||
*
|
||||
* @covers \core_external\external_api::get_context
|
||||
* @covers \core_external\external_api::get_context_from_params
|
||||
*/
|
||||
public function test_get_context_params2(): void {
|
||||
global $USER;
|
||||
@@ -357,7 +357,7 @@ class external_api_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test \core_external\external_api::get_context()_from_params parameter validation.
|
||||
* @covers \core_external\external_api::get_context
|
||||
* @covers \core_external\external_api::get_context_from_params
|
||||
*/
|
||||
public function test_get_context_params3(): void {
|
||||
global $USER;
|
||||
|
||||
Reference in New Issue
Block a user